daveawb / repository
A generic repository for Laravel
Installs: 5 525
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires (Dev)
- orchestra/database: ~3.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^6.0
README
A repository package to add easy to use repositories to any Laravel project utilising Eloquent as the primary DAL. Tested in Laravel 5.3.
Installation
composer require daveawb/repos
Usage
Create a repository class
namespace App\Repositories;
class Repository extends \Daveawb\Repos\Repository
{
/**
* Return the models class name
*
* @return string
*/
public function model()
{
return App\User::class;
}
}