onethirtyone/repository-pattern

This package is abandoned and no longer maintained. No replacement package was suggested.

An artisan command interface for generating Laravel repository pattern modules

v1.1.1 2018-04-20 18:30 UTC

This package is not auto-updated.

Last update: 2020-04-02 02:28:32 UTC


README

Build Status StyleCI

Simple Artisan command to create repository pattern modules for Laravel application. Run php artisan onethirtyone:create-repository Test -m to create App\Repositories\TestRepository.php ad associated App\Test.php Model. Omit the -m option to skip creating the model.

##Installation Install using composer

composer require onethirtyone/repository-pattern

For laravel 5.5+ there is nothing more you need to do. For laravel 5.4 and below add the service provider to your config/app.php

$providers => [
...
onethirtyone\Repository\RepositoryProvider::class,
...
];

Run the Artisan command to create a repository and the, optional, associated model

php artisan onethirtyone:make-repository Test -m

This will create a TestRepository.php file under app\Repositories. if using the -m options, the associated Eloquent model will be created under app/