dev-master
9999999-devLaravel 5 - very simply repositories without all the fluff...
MIT
The Requires
by Jonas Kervin Hansen
database laravel repository eloquent model
Laravel 5 - very simply repositories without all the fluff...
Laravel 5 Repositories is used to abstract the data layer, making our application more flexible to maintain., (*1)
Execute the following command to get the latest version of the package:, (*2)
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. ```composer.json "minimum-stability":"dev", "prefer-stable": true, (*3)
### Laravel In your `config/app.php` add `Sasin91\LaravelRepository\RepositoryServiceProvider::class` to the end of the `Package Service Providers` array: ```php 'providers' => [ ... Sasin91\LaravelRepository\RepositoryServiceProvider::class, ],
Publish Configuration, (*4)
php artisan vendor:publish
To generate everything you need for your Model, run this command:, (*5)
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., (*6)
@note: the model option is really just an alias to the database option., (*7)
Laravel 5 - very simply repositories without all the fluff...
MIT
database laravel repository eloquent model