joy2362 / service-generator
A set of tools to make working with service easier in Laravel
Requires
- php: ^8.1
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-12-18 21:18:31 UTC
README
A set of tools to make working with service easier in Laravel
Top features:
- Creates trait by using artisan command
- Creates service by using artisan command
- Creates controller service by using artisan command
- Add common functions that require to create API
Installation
You can install this package using Composer.
composer require joy2362/service-generator
Publish lang file:
php artisan vendor:publish --tag="service-generator-stub"
Publish stub file:
php artisan vendor:publish --tag="service-generator-lang"
Usage
1. Create trait
File location app/trait
php artisan make:trait NotifiableTrait
2. Create service
File location app/service
php artisan make:service CategoryService
3. Create controller service
i. create controller and service file only
File location app/service && app/Http/Controllers
php artisan make:c-s Category
ii. create controller and service with API crud operation
File location app/service && app/Http/Controllers && app/Http/Requests
php artisan make:c-s Category --api
Tip: if the name matches with any model then it will generate crud operation
Changelog
Please see Releases for more information on what has changed recently.
Contributing
Pull requests are more than welcome. You must follow the PSR coding standards.
Security
If you discover any security-related issues, please email abdullahzahidjoy@gmail.com instead of using the issue tracker.