Open mysic opened 2 years ago
hello when I ran the command "php artisan make:repository SomethingRepository" ,and catched the exception info.
my env is : Laravel Framework 6.20.44 czim/laravel-repository 2.0.2
at /xxx/vendor/czim/laravel-repository/src/Console/Commands/MakeRepositoryCommand.php:159 155| 156| $repositoryClass = str_replace($this->getNamespace($name) . '\\', '', $name); 157| $class = str_replace($this->suffix, '', $repositoryClass); 158| >159| $modelClass = str_singular($class); 160| } 161| 162| // Append the expected models namespace if not namespaced yet 163| if (false === strpos($modelClass, '\\')) {
it's better to change the str_singular($class) to Str::singular($class)
str_singular($class)
Str::singular($class)
I don't really support this legacy package anymore. Your best bet it is to upgrade so you can use package version 3.0.0. If you want to submit a PR for an older version, that is welcome too of course.
3.0.0
hello when I ran the command "php artisan make:repository SomethingRepository" ,and catched the exception info.
my env is : Laravel Framework 6.20.44 czim/laravel-repository 2.0.2
it's better to change the
str_singular($class)
toStr::singular($class)