Open isjjas opened 4 years ago
Same here, using Laravel 7.
This is due to using Laravel > 5.6, which replaced str_plural()
with Str::plural()
, same for Str::singular()
and Str::contains()
.
Workaround:
Add these functions as global functions manually: Add app/Helpers/helpers.php:
<?php
use Illuminate\Support\Str;
function str_plural(...$args) {
return Str::plural(...$args);
}
function str_singular(...$args) {
return Str::singular(...$args);
}
function str_contains(...$args) {
return Str::contains(...$args);
}
Register with composer autoload: composer.json:
"autoload": {
...
"files": [
"app/Helpers/helpers.php"
]
}
Re-read autoloaded files:
$ composer dump-autoload
In the long term, I think it would be best to deprecate Laravel <= 5.6 in the package or add a new Version for Laravel >= 5.6.
@kEpEx If you want, I can implement these changes and thanks for the package!
thanks @messersm I will try to update in few next days or if you send a PR I can publish it as well if you like to contribute!
Thanks
This is the fix, it only works for laravel 8 for the routes, I just couldn't figured out how to pull request
https://www.dropbox.com/s/4a2o8gen4hnfu8j/kepex.zip?dl=1
If you want to use the fix, just add the uncompresed folder to vendor, and that's it.
al ejecutar este comando me sale el siguiente mensaje de error php artisan make:crud Zonas
Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined function CrudGenerator\Console\Commands\str_plural()
gracias por tu colaboracion