gustavorf / repo-create
A simply tool to create repository and service folders inside app folder.
This package is auto-updated.
Last update: 2025-01-10 13:40:07 UTC
README
Simple repository and service file creator for laravel 5+.
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.