zintel/laravel-service

This package helps you create a service and bind a model to it

1.0.3 2025-03-27 06:05 UTC

This package is auto-updated.

Last update: 2025-04-27 06:23:21 UTC


README

Latest Version License

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

  1. Install via Composer:
composer require zintel/laravel-service
  1. The package will auto-register. For manual registration, add to config/app.php:
'providers' => [
    // ...
    \Zintel\LaravelService\Providers\MakeServiceCommandProvider::class,
],
  1. Basic Command
php artisan make:service ServiceName --m=ModelName
  1. With Model Binding
php artisan make:service ServiceName --m=ModelName

5Nested Services

php artisan make:service Folder/ServiceName