Skip to content

nivslive/makeservicerepository

 
 

Repository files navigation

Make Service Repository

Quickly generate command make for Service and Repository files for projects using Laravel packages.

Install

Via Composer

composer require felipedamacenoteodoro/makeservicerepository --dev

Usage

Open the console and enter one of the commands:

  • Generate all files for one new Service and Repository interface:
php artisan make:crudsrv {Entity_name}
  • Generate a Repository Interface
php artisan make:repositoryi {Entity_name}
  • Generate a Service Interface
php artisan make:servicei {Entity_name}
  • Generate a Service
php artisan make:service {Entity_name}
  • Generate a Repository file
php artisan make:repository {Entity_name}

Remember

You need to map the interface bind on your application server provider.

  • Exemple:

Add In the boot method of your service provider app/Providers/AppServiceProvider.php:

$this->app->bind(YourEntityCreatedServiceInterface::class, YourEntityCreatedService::class);
$this->app->bind(YourEntityCreatedRepositoryInterface::class, YourEntityCreatedRepository::class);

Change log

Please see CHANGELOG for more information what has changed recently.

About

Laravel make service and repository files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%