EnverKESMEN / l5-service-layer

This package add service layer to laravel 5
MIT License
9 stars 2 forks source link

Call to undefined function KesmenEnver\ServiceLayer\Commands\camel_case() error #1

Open lokendrapanwar opened 4 years ago

lokendrapanwar commented 4 years ago

When I run command >php artisan make:service CreateProduct getting error Call to undefined function KesmenEnver\ServiceLayer\Commands\camel_case() error

Error

Call to undefined function KesmenEnver\ServiceLayer\Commands\camel_case()

at D:\wamp\www\project\laravel-8-rest-api\vendor\kesmenenver\servicelayer\src\commands\ServiceMakeCommand.php:69 65▕ } 66▕ 67▕ protected function getClassName() 68▕ { ➜ 69▕ return ucwords(camel_case($this->getNameInput())) . 'Service'; 70▕ } 71▕ 72▕ protected function getInterfaceName() 73▕ {

1 D:\wamp\www\project\laravel-8-rest-api\vendor\kesmenenver\servicelayer\src\commands\ServiceMakeCommand.php:104 KesmenEnver\ServiceLayer\Commands\ServiceMakeCommand::getClassName()

2 D:\wamp\www\project\laravel-8-rest-api\vendor\kesmenenver\servicelayer\src\commands\ServiceMakeCommand.php:59 KesmenEnver\ServiceLayer\Commands\ServiceMakeCommand::buildClass("App\CreateProduct")

D:\wamp\www\project\laravel-8-rest-api>php artisan make:service Services/user

Error

Call to undefined function KesmenEnver\ServiceLayer\Commands\camel_case()

at vendor\kesmenenver\servicelayer\src\commands\ServiceMakeCommand.php:69 65▕ } 66▕ 67▕ protected function getClassName() 68▕ { ➜ 69▕ return ucwords(camel_case($this->getNameInput())) . 'Service'; 70▕ } 71▕ 72▕ protected function getInterfaceName() 73▕ {

1 D:\wamp\www\project\laravel-8-rest-api\vendor\kesmenenver\servicelayer\src\commands\ServiceMakeCommand.php:104 KesmenEnver\ServiceLayer\Commands\ServiceMakeCommand::getClassName()

jamalsaidapp commented 3 years ago

@lokendrapanwar

go to src/commands/ServiceMakeCommand.php and replace camel_case with Str::camel .

And thank me Later :)