Download the PHP package adityadarma/laravel-service-repository without Composer
On this page you can find all versions of the php package adityadarma/laravel-service-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adityadarma/laravel-service-repository
More information about adityadarma/laravel-service-repository
Files in adityadarma/laravel-service-repository
Package laravel-service-repository
Short Description Create pattern service and repository with easy
License MIT
Homepage https://github.com/adityadarma/laravel-service-repository
Informations about the package laravel-service-repository
Service and Repository pattern for laravel!
Requirement
- Minimum PHP ^8.0
- Laravel ^9.x
Installation
You can install the package via composer for latest version
Install the base service part of core base service:
Usage
*Service
Create service
Used on controller
Use Service & Exception
Every all exception, must have handle to class CustomException
*Repository
Create repository
- --model will create repository with construct model
You can use general function on trait "GeneralFunctionRepository".
Used on service
*Request
- --single will make all method to single file request (store, update, delete)
Command request is customized, have failedValidation to consistent API response. I also added an argument, so that we can carry out validation in one FormRequest file. Add function messages to custom response attribute message
*Model
- --trait will file trait to use on model like accessor, mutator, relationship and scope
- --repository will create file repository with construct model
Command model is customized, we add 2 argument type. You can separate it into traits (accessor, mutator, relationship and scope) and add file repository.
License
This Package is licensed under the MIT license. Enjoy!