gustavorf/repo-create

A simply tool to create repository and service folders inside app folder.

v1.1.2 2019-12-10 01:15 UTC

This package is auto-updated.

Last update: 2024-06-10 12:13:23 UTC


README

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