Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Aug 10, 2020
1 parent ba8af9e commit 3dcc4a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/Illuminate/Routing/PendingResourceRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,27 +170,27 @@ public function withoutMiddleware($middleware)
}

/**
* Indicate that the resource routes should have "shallow" nesting.
* Add "where" constraints to the resource routes.
*
* @param bool $shallow
* @param mixed $wheres
* @return \Illuminate\Routing\PendingResourceRegistration
*/
public function shallow($shallow = true)
public function where($wheres)
{
$this->options['shallow'] = $shallow;
$this->options['wheres'] = $wheres;

return $this;
}

/**
* Add wheres to the resource routes.
* Indicate that the resource routes should have "shallow" nesting.
*
* @param mixed $wheres
* @param bool $shallow
* @return \Illuminate\Routing\PendingResourceRegistration
*/
public function wheres($wheres)
public function shallow($shallow = true)
{
$this->options['wheres'] = $wheres;
$this->options['shallow'] = $shallow;

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Routing/RouteRegistrarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public function testResourceWheres()
];

$this->router->resource('users', RouteRegistrarControllerStub::class)
->wheres($wheres);
->where($wheres);

/** @var \Illuminate\Routing\Route $route */
foreach ($this->router->getRoutes() as $route) {
Expand Down

0 comments on commit 3dcc4a6

Please sign in to comment.