Skip to content

This package allow generate service layer for abstraction the classes of the business logic and decoupling calls to models.

License

Notifications You must be signed in to change notification settings

luis199230/laravel-service-layer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Service Layer

Packagist GitHub stars

This package allow generate service layer for abstraction the classes of the business logic and decoupling calls to models. My advice is use this layer of abstraction as intermediate between controllers and models.

Installation

composer require madeweb/service-layer

Generate service base class and custom service class

    php artisan make:service ServiceName  

Generate service base class and custom service class with custom model

    php artisan make:service ServiceName --model=App\\Models\\ModelName

For Lumen and Laravel version without discovery package

In file bootstrap/app.php (Lumen)

    $app->register(Madeweb\ServiceLayer\ServiceLayerProvider::class);

In file config/app.php (Laravel without discovery package)

 'providers' => [
        /*
         * Custom Service Providers...
         */
        Madeweb\ServiceLayer\ServiceLayerProvider::class,
  ];

About

This package allow generate service layer for abstraction the classes of the business logic and decoupling calls to models.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages