Skip to content

joy2362/service-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

service-generator

A set of tools to make working with service easier in Laravel

Latest Version MIT Licensed Total Downloads

Top features:

  • Creates trait by using artisan command
  • Creates service by using artisan command
  • Creates controller service by using artisan command
  • Add common functions that require to create API

Installation

You can install this package using Composer.

composer require joy2362/service-generator

Publish lang file:

php artisan vendor:publish --tag="service-generator-stub"

Publish stub file:

php artisan vendor:publish  --tag="service-generator-lang"

Usage

1. Create trait

File location app/trait

php artisan make:trait NotifiableTrait

2. Create service

File location app/service

php artisan make:service CategoryService

3. Create controller service

i. create controller and service file only

File location app/service && app/Http/Controllers

php artisan make:c-s Category

ii. create controller and service with API crud operation

File location app/service && app/Http/Controllers && app/Http/Requests

php artisan make:c-s Category --api

Tip: if the name matches with any model then it will generate crud operation

Changelog

Please see Releases for more information on what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

If you discover any security-related issues, please email abdullahzahidjoy@gmail.com instead of using the issue tracker.