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

fix: exclude internal parameters #482

Merged
merged 4 commits into from
Dec 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test
  • Loading branch information
bakerkretzmar committed Dec 3, 2021
commit dbf303a1d482ebfa0c2c68ac7f44f151de7b6527
11 changes: 11 additions & 0 deletions tests/Unit/RouteModelBindingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ public function can_ignore_route_parameters_not_bound_to_eloquent_models()
], (new Ziggy)->filter(['tokens'])->toArray()['routes']);
}

/** @test */
public function can_ignore_route_action_parameters_without_corresponding_route_segment()
{
$this->assertSame([
'users.store' => [
'uri' => 'users',
'methods' => ['POST'],
],
], (new Ziggy)->filter(['users.store'])->toArray()['routes']);
}

/** @test */
public function can_handle_bound_and_unbound_parameters_in_the_same_route()
{
Expand Down