getsolaris / laravel-make-service by getsolaris

A MVCS pattern create a service command for Laravel 5+
99,490
78
6
Package Data
Maintainer Username: getsolaris
Maintainer Contact: getsolaris.kr@gmail.com (getsolaris)
Package Create Date: 2018-10-16
Package Last Update: 2024-02-28
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-15 15:17:56
Package Statistics
Total Downloads: 99,490
Monthly Downloads: 3,588
Daily Downloads: 210
Total Stars: 78
Total Watchers: 6
Total Forks: 16
Total Open Issues: 0

Latest Stable Version Monthly Downloads Total Downloads License PHP Version Require

A MVCS pattern create a service command for Laravel 5+

Create a new service class and service interface

Install

composer require getsolaris/laravel-make-service --dev

Suggest

getsolaris.kr@gmail.com

Usage

$ php artisan make:service {name : Create a service class} {--i : Optional of create a service interface}

Example

Create a service class

$ php artisan make:service UserService
<?php
// app/Http/Services/UserService.php

namespace App\Services;

/**
 * Class UserService
 * @package App\Services
 */
class UserService
{

}

+ Optional service interface

v1.0.x -> contract
v1.1.x -> interface
$ php artisan make:service UserService --i
<?php
// app/Http/Services/Contracts/UserServiceInterface.php

namespace App\Services\Interfaces;

/**
 * Interface UserServiceInterface
 * @package App\Services\Interfaces
 */
interface UserServiceInterface
{

}