Skip to content

Commit

Permalink
[5.3] Fix lower case model names in policy classes (laravel#15270)
Browse files Browse the repository at this point in the history
Fixes the model name variables (from lower case to camel case) when generating a policy class based on a model.
  • Loading branch information
memu authored and tillkruss committed Sep 8, 2016
1 parent 821bb83 commit a9cd72c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/PolicyMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ protected function replaceModel($stub, $model)

$stub = str_replace('DummyModel', $model, $stub);

$stub = str_replace('dummyModelName', Str::lower($model), $stub);
$stub = str_replace('dummyModelName', Str::camel($model), $stub);

return str_replace('dummyPluralModelName', Str::plural(Str::lower($model)), $stub);
return str_replace('dummyPluralModelName', Str::plural(Str::camel($model)), $stub);
}

/**
Expand Down

0 comments on commit a9cd72c

Please sign in to comment.