zintel / laravel-service
This package helps you create a service and bind a model to it
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/zintel/laravel-service
Requires
- php: ^7.1|^8.1
README
A Laravel Artisan command to generate service classes following the Model-View-Controller-Service (MVCS) pattern, promoting separation of business logic from controllers.
Features
- 🚀 Quick service class generation
- 📁 Supports nested directory structure
- 🔗 Optional model binding
- 🛠️ Pre-configured CRUD method stubs
- ⚡ Laravel 9.x and 10.x compatible
Installation
- Install via Composer:
composer require zintel/laravel-service
- The package will auto-register. For manual registration, add to config/app.php:
'providers' => [ // ... \Zintel\LaravelService\Providers\MakeServiceCommandProvider::class, ],
- Basic Command
php artisan make:service ServiceName --m=ModelName
- With Model Binding
php artisan make:service ServiceName --m=ModelName
5Nested Services
php artisan make:service Folder/ServiceName