Skip to content

Gustavo-RF/repository-create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Laravel Repository and Service creator

Simple repository and service file creator for laravel 5+.

Latest Version Stars Total Downloads

Installation

Using composer:

composer require gustavorf/repo-create --dev

Laravel version

Laravel 5.5+ supports auto discover for service providers. If your laravel version is 5.4 or lower, you have to add this line inside providers array in config/app.php

  'providers' => [
  
    ...
  
    GustavoRF\RepoCreate\RepoCreateServiceProvider::class,
  
  ],

Usage

Open your terminal in your project root and type:

php artisan repository:create MyRepository

This command will create a new Repository Class inside app/Repositories. If app/Repositories folder doesn't exists, it will be created as well.

You can also send a model name using --model option:

php artisan repository:create MyRepository --model=MyModel

This command set MyModel usage in MyRepository class. If MyModel doesn't exists, it will be created.

Similarly, you can create services:

php artisan service:create MyService
php artisan service:create MyService --model=MyModel

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Simple repository and service files creator for Laravel 5+

Resources

Stars

5 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors

Languages