PHPackages                             getsolaris/laravel-make-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. getsolaris/laravel-make-service

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

getsolaris/laravel-make-service
===============================

A MVCS pattern create a service command for Laravel 5+

v1.1.4(2mo ago)81161.3k↓19.3%15MITPHPPHP ^7.1|^8.0

Since Nov 5Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/getsolaris/laravel-make-service)[ Packagist](https://packagist.org/packages/getsolaris/laravel-make-service)[ RSS](/packages/getsolaris-laravel-make-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

Laravel Make Service
====================

[](#laravel-make-service)

[![Latest Stable Version](https://camo.githubusercontent.com/395bbbcad3ea90a1b501ff79b48076b6e0561925b00f80ed3f0608c5f9799790/687474703a2f2f706f7365722e707567782e6f72672f676574736f6c617269732f6c61726176656c2d6d616b652d736572766963652f76)](https://packagist.org/packages/getsolaris/laravel-make-service)[![Total Downloads](https://camo.githubusercontent.com/2bc3c31ca76c167d5072a137183970b8ac468e95b7c5858d6664f188cc0269c3/687474703a2f2f706f7365722e707567782e6f72672f676574736f6c617269732f6c61726176656c2d6d616b652d736572766963652f646f776e6c6f616473)](https://packagist.org/packages/getsolaris/laravel-make-service)[![Monthly Downloads](https://camo.githubusercontent.com/5141b36425e7e4487f24ff662abb485fc32722b512733f57d09682cc4d098eee/687474703a2f2f706f7365722e707567782e6f72672f676574736f6c617269732f6c61726176656c2d6d616b652d736572766963652f642f6d6f6e74686c79)](https://packagist.org/packages/getsolaris/laravel-make-service)[![License](https://camo.githubusercontent.com/9a0ad10156822c3175597d6ba6386d713c7dee5b46d5baab99e9dc9e9212e092/687474703a2f2f706f7365722e707567782e6f72672f676574736f6c617269732f6c61726176656c2d6d616b652d736572766963652f6c6963656e7365)](https://packagist.org/packages/getsolaris/laravel-make-service)[![PHP Version Require](https://camo.githubusercontent.com/7e3475de0cbd0eb77309f8b789c7249f3906c606a5f2855ccb3b197feb5dbf9d/687474703a2f2f706f7365722e707567782e6f72672f676574736f6c617269732f6c61726176656c2d6d616b652d736572766963652f726571756972652f706870)](https://packagist.org/packages/getsolaris/laravel-make-service)

A Laravel package that provides an Artisan command to generate service classes, implementing the MVCS (Model-View-Controller-Service) pattern in your Laravel applications.

Overview
--------

[](#overview)

This package simplifies the creation of service layer classes in Laravel applications. It helps you maintain clean architecture by separating business logic from controllers, making your code more maintainable, testable, and reusable.

Requirements
------------

[](#requirements)

- PHP 7.1 or higher
- Laravel 5.6.34 or higher (supports up to Laravel 12)

Installation
------------

[](#installation)

Install the package via Composer:

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

The package will automatically register itself using Laravel's package discovery.

Usage
-----

[](#usage)

### Basic Command Syntax

[](#basic-command-syntax)

```
php artisan make:service {name} {--i : Create a service interface}
```

### Creating a Service Class

[](#creating-a-service-class)

To create a simple service class:

```
php artisan make:service UserService
```

This will create a service class at `app/Services/UserService.php`:

```
