Skip to content

Commit

Permalink
replaced depreceted snake case helper
Browse files Browse the repository at this point in the history
  • Loading branch information
muhaimenul committed Jul 9, 2021
1 parent 7fc743c commit 2ac9b33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/CrudGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected function routes(){
protected function migration()
{
$name = $this->name;
$migrationName = string_plural(snake_case($name));
$migrationName = string_plural(string_snake($name));
$tableName = $migrationName;

$className = ucwords(string_plural($name));
Expand Down
6 changes: 6 additions & 0 deletions src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ function string_plural($string) {
\Illuminate\Support\Str::plural($string);
}
}

if(!function_exists('string_snake')) {
function string_snake($string) {
\Illuminate\Support\Str::snake($string);
}
}

0 comments on commit 2ac9b33

Please sign in to comment.