Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge array and with parameters #367

Merged
merged 3 commits into from
Oct 9, 2024
Merged

Conversation

mateusjunges
Copy link
Member

This PR updates the ArrayParametersOverViewWith formatter to merge existing parameters passed using array syntax with the ones passed using the with method.

Currently, when you use both syntaxes, the formatter removes all array parameters and adds only what is being passed using the with method. Example:

return view('foo.bar', ['first' => 'yes', 'second' => 'yes'])->with('third', 'no');

becomes

return view('foo.bar', ['third' => 'no']);

when it should be

return view('foo.bar', ['first' => 'yes', 'second' => 'yes', 'third' => 'no']);

@mateusjunges mateusjunges self-assigned this Oct 9, 2024
Copy link

@gcava-leantechio gcava-leantechio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@driftingly driftingly merged commit dc43abb into main Oct 9, 2024
19 checks passed
@driftingly driftingly deleted the merge-array-and-with-parameters branch October 9, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants