Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

create services in laravel with command line

class ServiceMakeCommand extends GeneratorCommand
{
    protected $name = 'make:service';
    protected $signature = 'make:service {name: Create your own service}';
    protected $description = 'Create a service for repository pattern';
    protected $type = 'Service';

    protected function getStub()
    {
        return app_path('Console/Stubs/service.stub');
    }

    protected function getDefaultNamespace($rootNamespace)
    {
        return $rootNamespace . 'Services';
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #services #laravel #command #line
ADD COMMENT
Topic
Name
8+6 =