andersao / l5-repository

Laravel 5 - Repositories to abstract the database layer
http://andersao.github.io/l5-repository
MIT License
4.19k stars 878 forks source link

Call to undefined function Prettus\Repository\Generators\Commands\snake_case() #638

Open GCarneiroA opened 5 years ago

GCarneiroA commented 5 years ago

Error on line: 69 in file RepositoryCommand.php on run command "php artisan make:entity my_entity"

bug

A simple solution to the problem is to change the function call from line 69. I will be sending the corresponding PR to the question.

tvad911 commented 5 years ago

Some function remove and change to Str::.. I think need a version to update all function change for Lar 6.0

RatanaKH commented 5 years ago

I got the same issue. For a temporary solution just modified file: Prettus\Repository\Generators\Commands

And then change function snake_case() to Str::snake() , str_plural() to Str::plural() by use use Illuminate\Support\Str

Reference https://laravel.com/api/6.x/Illuminate/Support/Str.html

Thanks.

TouchSek commented 5 years ago

you need to use laravel helper to make it works, since laravel 6.0 move that helper to external file Helper