lauchoit/laravel-service

A simple package to create a make:service command for Laravel 7+

dev-main 2021-09-10 17:29 UTC

This package is not auto-updated.

Last update: 2025-07-15 08:34:09 UTC


README

#Get Started

Laravel PHP Artisan Make:Service

A simple package for addding php artisan make:service command to Laravel 7+ and above

Installation

Require the package with composer using the following command:

composer require lauchoit/laravel-service --dev

Or add the following to your composer.json's require-dev section and composer update

"require-dev": {
    "lauchoit/laravel-service": "dev-main",
}

Usage

php artisan make:service your-service-name

Example:

php artisan make:service User
            or
php artisan make:service UserService

or

php artisan make:service User\User
            or
php artisan make:service User\UserService

This packet creates the Services folder inside the app.

Example:

<?php

namespace DummyNamespace;

use LauchoIT\LaravelService\Service\BaseService;

/**
 * Class DummyClass.
 */
class DummyClass extends BaseService
{
    /**
     * @return string
     *  Return the model
     */
    public function model()
    {
        //return YourModel::class;
    }
}

More informations visit https://lauchoit.com