services d'artisan PHP
php artisan make:provider RiakServiceProvider
Shadow
php artisan make:provider RiakServiceProvider
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';
}
}
<?php
namespace App\Service;
class DummyClass
{
}