PHPackages                             prevailexcel/laravel-action-service-trait - 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. prevailexcel/laravel-action-service-trait

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

prevailexcel/laravel-action-service-trait
=========================================

A simple Laravel package to create actions, traits and services using artisan commands

1.0.1(2y ago)143.0k↓35.7%1MITPHPPHP ^7.1|^8.0

Since Jan 7Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

laravel-action-service-trait
============================

[](#laravel-action-service-trait)

[![Latest Stable Version](https://camo.githubusercontent.com/454baeb6882234443d709ffbe8bf08ffdf1a27a8037c2e8bcac969b1a9ae0762/687474703a2f2f706f7365722e707567782e6f72672f7072657661696c657863656c2f6c61726176656c2d616374696f6e2d736572766963652d74726169742f76)](https://packagist.org/packages/prevailexcel/laravel-action-service-trait)[![License](https://camo.githubusercontent.com/811a018cce42c89ee997db68d47c91ef5dca2176d33265d5f1491ef6e21e74f6/687474703a2f2f706f7365722e707567782e6f72672f7072657661696c657863656c2f6c61726176656c2d616374696f6e2d736572766963652d74726169742f6c6963656e7365)](https://packagist.org/packages/prevailexcel/laravel-action-service-trait)

> A Simple Package to create actions, traits and services using artisan commands in laravel.

This package extends the `make:` commands to help you easily create traits, action classes and service classes in Laravel 5+. It also comes with the option of creating an interface for the service.

Install
=======

[](#install)

```
composer require prevailexcel/laravel-action-service-trait
```

Or add the following line to the require block of your `composer.json` file.

```
"prevailexcel/laravel-action-service-trait": "1.0.*"

```

You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.

Once it is installed, you can use any of the commands in your terminal.

Usage
=====

[](#usage)

```
php artisan make:action {name}
```

```
php artisan make:service {name}
```

```
php artisan make:service {name} --i
```

```
php artisan make:trait {name}
```

Examples
========

[](#examples)

Create an action class
----------------------

[](#create-an-action-class)

```
$ php artisan make:action CreateUser
```

`/app/Actions/CreateUser.php`

```
