sohelamin/laravel-admin

Call to undefined function snake_case()

Closed this issue · 3 comments

Hello,

I'm using a fresh installation from laravel 7 and laravel-admin v3.3.0. When I use the Generator in tools box, i get this error:

Call to undefined function Appzcoder\LaravelAdmin\Controllers\snake_case()

Here, too, the same thing happens.
Larave 7.x fresh installation.

Solved:
Edit on vendor \appzcoder\laravel-admin\src\Controllers\ProcessController.php

Add use Illuminate\Support\Str;

Change snake_case for Str::snake

$routeName = ($commandArg['--route-group']) ? $commandArg['--route-group'] . '/' . Str::snake($name, '-') : Str::snake($name, '-');

same here

Here, too, the same thing happens.
Larave 7.x fresh installation.

Solved:
Edit on vendor \appzcoder\laravel-admin\src\Controllers\ProcessController.php

Add use Illuminate\Support\Str;

Change snake_case for Str::snake

$routeName = ($commandArg['--route-group']) ? $commandArg['--route-group'] . '/' . Str::snake($name, '-') : Str::snake($name, '-');

Solution.