getsolaris / laravel-make-service
A MVCS pattern create a service command for Laravel 5+
Installs: 100 630
Dependents: 0
Suggesters: 1
Security: 0
Stars: 78
Watchers: 6
Forks: 16
Open Issues: 0
Requires
- php: ^7.1|^8.0
- illuminate/console: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/support: ~5.6.34|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- phpunit/phpunit: ^9.5|^10.0
README
A MVCS pattern create a service command for Laravel 5+
Create a new service class and service interface
Install
composer require getsolaris/laravel-make-service --dev
Suggest
Usage
$ php artisan make:service {name : Create a service class} {--i : Optional of create a service interface}
Example
Create a service class
$ php artisan make:service UserService
<?php // app/Http/Services/UserService.php namespace App\Services; /** * Class UserService * @package App\Services */ class UserService { }
+ Optional service interface
v1.0.x -> contract
v1.1.x -> interface
$ php artisan make:service UserService --i
<?php // app/Http/Services/Contracts/UserServiceInterface.php namespace App\Services\Interfaces; /** * Interface UserServiceInterface * @package App\Services\Interfaces */ interface UserServiceInterface { }