Skip to content

Commit 07d04bd

Browse files
JosephSilbertaylorotwell
authored andcommitted
Tweak method name (#18964)
1 parent 6de58f5 commit 07d04bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function authorizeResource($model, $parameter = null, array $options = []
8686
$middleware = [];
8787

8888
foreach ($this->resourceAbilityMap() as $method => $ability) {
89-
$modelName = in_array($method, $this->methodsWithoutModels()) ? $model : $parameter;
89+
$modelName = in_array($method, $this->resourceMethodsWithoutModels()) ? $model : $parameter;
9090

9191
$middleware["can:{$ability},{$modelName}"][] = $method;
9292
}
@@ -118,7 +118,7 @@ protected function resourceAbilityMap()
118118
*
119119
* @return array
120120
*/
121-
protected function methodsWithoutModels()
121+
protected function resourceMethodsWithoutModels()
122122
{
123123
return ['index', 'create', 'store'];
124124
}

0 commit comments

Comments
 (0)