mohamadtsn/laravel-repository

repository class management in laravel apps

2.3.0 2024-07-07 17:10 UTC

This package is auto-updated.

Last update: 2024-11-07 18:08:05 UTC


README

Laravel Repository

Supernova image

Use Repository Pattern in Laravel app

Installation: ⬇️

composer require mohamadtsn/laravel-repository

configuration: ⚙️

Publish config file

php artisan vendor:publish --tag=repository-config --force

Do in Laravel 8:

Put this in App\Http\Controllers\Controller.php

use Mohamadtsn\Repository\Traits\Repository; // use Repository trait

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests, Repository// use trait in Controller class;
    // other class methods
}

Enjoy it 👋