Skip to content

Commit 3dcc4a6

Browse files
committed
formatting
1 parent ba8af9e commit 3dcc4a6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Illuminate/Routing/PendingResourceRegistration.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -170,27 +170,27 @@ public function withoutMiddleware($middleware)
170170
}
171171

172172
/**
173-
* Indicate that the resource routes should have "shallow" nesting.
173+
* Add "where" constraints to the resource routes.
174174
*
175-
* @param bool $shallow
175+
* @param mixed $wheres
176176
* @return \Illuminate\Routing\PendingResourceRegistration
177177
*/
178-
public function shallow($shallow = true)
178+
public function where($wheres)
179179
{
180-
$this->options['shallow'] = $shallow;
180+
$this->options['wheres'] = $wheres;
181181

182182
return $this;
183183
}
184184

185185
/**
186-
* Add wheres to the resource routes.
186+
* Indicate that the resource routes should have "shallow" nesting.
187187
*
188-
* @param mixed $wheres
188+
* @param bool $shallow
189189
* @return \Illuminate\Routing\PendingResourceRegistration
190190
*/
191-
public function wheres($wheres)
191+
public function shallow($shallow = true)
192192
{
193-
$this->options['wheres'] = $wheres;
193+
$this->options['shallow'] = $shallow;
194194

195195
return $this;
196196
}

tests/Routing/RouteRegistrarTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public function testResourceWheres()
533533
];
534534

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

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

0 commit comments

Comments
 (0)