programic/laravel-repository

Using repositories in Laravel

v1.0.2 2021-08-02 09:05 UTC

This package is auto-updated.

Last update: 2024-11-29 06:29:14 UTC


README

Latest Version on Packagist Total Downloads

This package allows you to use Repositories and keeps the controllers clean

Installation

This package requires PHP 7.2 and Laravel 5.8 or higher.

composer require programic/laravel-repository

Basic Usage

# Create Repository
php artisan make:repository UserRepository
use App\Repositories\UserRepository;
use Illuminate\Http\Request;

class UserController {

    public function index(Request $request, UserRepository $userRepository)
    {
        $userCollection = $userRepository->search($request)->get();
    }
    
} 

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email info@programic.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.