Looking to hire Laravel developers? Try LaraJobs

laravel-service-kit maintained by ahmobin

Description
Laravel Service Kit is a PHP library that creates services, interfaces and repository class files.
Author
ahmobin
Last update
2024/03/11 07:51 (dev-master)
License
Links
Downloads
14

Comments
comments powered by Disqus

Laravel Service Kit

This package provides a set of commands to quickly generate service, interface, and repository classes in your Laravel application.

Installation

Install the package via Composer:

composer require --dev ahmobin/laravel-service-kit

Register Service Provider:

'providers' => [
    // Other Service Providers
    \Mobin\LaravelServiceKit\LaravelServiceKitServiceProvider::class,
],

Usages:

Creating a Service Class

To create a service class, run the following command:

php artisan make:service YourClassNameService
Creating an Interface Class

To create an interface class, run the following command:

php artisan make:interface YourClassNameInterface
Creating a Repository Class

To create a repository class, run the following command:

php artisan make:repo YourClassNameRepository

Further you may bind the repository class with interface in your AppServiceProvider

Feel free to customize the class names as per your application's naming conventions.