Skip to content

Simple Laravel Artisan command to create Repository Pattern Modules for Laravel

Notifications You must be signed in to change notification settings

robbfountain/repository-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneThirtyOne/Repository-Pattern

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/

About

Simple Laravel Artisan command to create Repository Pattern Modules for Laravel

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages