PHPackages                             ceceply/action - 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. [Framework](/categories/framework)
4. /
5. ceceply/action

ActiveLibrary[Framework](/categories/framework)

ceceply/action
==============

Laravel action generator

v1.0.0(2y ago)118MITPHP

Since Aug 14Pushed 2y agoCompare

[ Source](https://github.com/ceceply/action)[ Packagist](https://packagist.org/packages/ceceply/action)[ RSS](/packages/ceceply-action/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

ceceply/action
==============

[](#ceceplyaction)

A [Laravel](https://laravel.com) package for generate action classes using [Artisan Command](https://laravel.com/docs/artisan).

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

[](#installation)

> **Requires [PHP 8.1+](https://php.net/releases/)**

Require using [Composer](https://getcomposer.org).

```
composer require ceceply/action --dev
```

Put `Ceceply\Action\Providers\ActionServiceProvider::class` into list of service providers in `config/app.php`.

```
'providers' => ServiceProvider::defaultProviders()->merge([
    /*
     * Package Service Providers...
     */
    Ceceply\Action\Providers\ActionServiceProvider::class,

    /*
     * Application Service Providers...
     */
])->toArray(),
```

Action Class
------------

[](#action-class)

In this package, an Action Class is a simple class that has only one task. Example, we have an Action class named `CreatePayment`. This class will has only one task, which is to create payments.

Also in this package, by default an Action class will implement interface. That interface will be automatically generated, before the action class generated. Example, if the Action class is named `CreatePayment`, the interface that class implements will be named `CreatesPayments`. You can customize the interface name later.

Run the following command to generate a new Action Class named `CreatePayment`.

```
php artisan make:action CreatePayment
```

If that command executed, an Action Class with interface implemented by the class generated.

```
// app/Actions/Payment/Contracts/CreatesPayments.php
