Download the PHP package erfanshk/laravel-layered-logic without Composer
On this page you can find all versions of the php package erfanshk/laravel-layered-logic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download erfanshk/laravel-layered-logic
More information about erfanshk/laravel-layered-logic
Files in erfanshk/laravel-layered-logic
Package laravel-layered-logic
Short Description Layered Repositories, Services and Interfaces
License MIT
Informations about the package laravel-layered-logic
Laravel Layered Logic
Under Development - Beta Release
A simple package to make repositories , services and their corresponding interfaces for laravel.
Works on
Laravel ^11.0
How to Install
Just run the command below and everything is ready.
How it works
LayeredLogicInitServiceProvider gets registered on your laravel app, which comes with a simple command
It creates the following files:
- App
- Layers
- Controllers
- UserController
- Requests
- UserRequest
- Resources
- UserResource
- Collection
- UserCollection
- Repositories
- UserRepository
- Interfaces
- UserRepositoryInterface
- Services
- UserService
- Interfaces
- UserServiceInterface
It also registers repository and service interfaces as singletons in the published LayeredLogicServiceProvider in:
App\Providers\LayeredLogicServiceProvider
The binding array is located in
config\layered.php
By running:
it is automatically registered in the app container. Now you can use your pre-made UserService by injecting the UserServiceInterface anywhere in your application.
What you get by using this package?
It really depends on what coding style you have. LayeredLogic main objective is to bring abstraction to laravel models and controllers. It also makes the creating and registering of such easy and less time-consuming.
Development
If you have any ideas to enhance the package, I would be more than happy to hear from you.
All versions of laravel-layered-logic with dependencies
illuminate/support Version ^11
illuminate/console Version ^11
illuminate/contracts Version ^11
illuminate/http Version ^11