Laravel 5 - very simply repositories without all the fluff...

dev-master 2017-01-19 20:24 UTC

This package is auto-updated.

Last update: 2022-01-11 22:29:16 UTC


Simply repositories without all the fluff...

Laravel 5 Repositories is used to abstract the data layer, making our application more flexible to maintain.



Execute the following command to get the latest version of the package:

composer require sasin91/laravel-repository:@dev

Note, to pull this in you might need to set your minimum stability in composer.json optionally, prefer stable releases.

"prefer-stable": true


In your config/app.php add Sasin91\LaravelRepository\RepositoryServiceProvider::class to the end of the Package Service Providers array:

'providers' => [

Publish Configuration

php artisan vendor:publish


To generate everything you need for your Model, run this command:

php artisan make:repository UserRepository {--generic} {--database=?} {--model=?}

if no database or model option is provided with the generic option, it'll attempt to guess a model, in your App namespace.

@note: the model option is really just an alias to the database option.