frankliniwobi / laravel-action-command
A Laravel package to generate Action classes via Artisan
Package info
github.com/frankliniwobi/laravel-action-command
pkg:composer/frankliniwobi/laravel-action-command
Requires
- php: ^8.3
Requires (Dev)
- laravel/framework: ^11.44.2|^12.52.0
- laravel/pint: ^1.18.1
- orchestra/testbench: ^9.5
- pestphp/pest: ^3.5.1
This package is auto-updated.
Last update: 2026-04-08 08:35:02 UTC
README
A simple Laravel package that adds a make:action Artisan command to scaffold Action classes.
Installation
composer require frankliniwobi/laravel-action-command
Laravel's auto-discovery will register the service provider automatically.
Usage
# Creates app/Actions/UserStoreAction.php php artisan make:action UserStore # Also works with the full name php artisan make:action UserStoreAction
Generated file
<?php namespace App\Actions; use Illuminate\Support\Facades\DB; final readonly class UserStoreAction { /** * Execute the action. */ public function handle(): void { DB::transaction(function (): void { // action }); } }
Customizing the Stub
Publish the stub to your project so you can tailor the generated file to your needs:
php artisan vendor:publish --tag=laravel-action-stubs
This copies laravel-action.stub to your project's stubs/ directory. Edit it freely — the command will use your published version automatically.
License
Laravel Action Command was created by Iwobi Okwudili Frank under the MIT license.