sasin91 / laravel-repository by Sasin91

Laravel 5 - very simply repositories without all the fluff...
35
0
3
Package Data
Maintainer Username: Sasin91
Maintainer Contact: jonas.kerwin.hansen@gmail.com (Jonas Kervin Hansen)
Package Create Date: 2016-12-27
Package Last Update: 2017-01-19
Language: PHP
License: MIT
Last Refreshed: 2024-04-25 15:18:28
Package Statistics
Total Downloads: 35
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Laravel 5 Repositories

Simply repositories without all the fluff...

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

Installation

Composer

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.

"minimum-stability":"dev",
"prefer-stable": true

Laravel

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

'providers' => [
    ...
    Sasin91\LaravelRepository\RepositoryServiceProvider::class,
],

Publish Configuration

php artisan vendor:publish

Commands

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.