Skip to content

Commit

Permalink
add support for multiword models to authorize resource controllers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hesto authored and taylorotwell committed Jun 29, 2017
1 parent 66325c2 commit 8cdd49e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function normalizeGuessedAbilityName($ability)
*/
public function authorizeResource($model, $parameter = null, array $options = [], $request = null)
{
$parameter = $parameter ?: lcfirst(class_basename($model));
$parameter = $parameter ?: snake_case(lcfirst(class_basename($model)));

$middleware = [];

Expand Down

0 comments on commit 8cdd49e

Please sign in to comment.