Download the PHP package dev-danno/laravel-repository-pattern without Composer
On this page you can find all versions of the php package dev-danno/laravel-repository-pattern. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dev-danno/laravel-repository-pattern
More information about dev-danno/laravel-repository-pattern
Files in dev-danno/laravel-repository-pattern
Package laravel-repository-pattern
Short Description Laravel Package to use the repository pattern with simple commands.
License MIT
Informations about the package laravel-repository-pattern
Laravel Repository Pattern Package
This package is to implement the Repository Pattern with Laravel.
It includes the creation and register of a custom ServiceProvider.
It includes the binding in the ServiceProvider.
It includes the creation of Model, Interface & implementation, Service class and Controller.
Optional, includes creation and implementation of an Api Response Class.
[!NOTE] This package is compatible with Laravel >= 9
[!CAUTION] Use this package only if you required and plan to use a
Repository Patternbased on Interface & Repository Class and dependency injection.
Installation 📌
-
Require the package using composer.
-
Laravel uses Auto-Discovery, so it doesn't require to manually add the ServiceProvider.
- Publish the config file
Usage 🧰
[!NOTE] When using
interface --repositoryormodel --csircommands, it will automatically create the custom ServiceProvider & register it.
-
Api Response Class
-
Interface with resources
-
Interface with resources, Repository class with resources and the corresponding binding.
-
Model with base structure
- Model, Interface & Repository with resources, Service & Controller class with resources and Dependency Injection.
[!NOTE] If
ApiResponseHelperclass exists, the controllers will include it in the responses.