PHP Package: lorisleiva/laravel-actions

Laravel-Actions is a powerful PHP library for creating reusable and testable actions in Laravel applications.

Current Version: 2.9.1
Last Updated: 2025-08-10
PHP Requirement: ^8.1
Dependencies:
phpunit/phpunit
illuminate/support
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel-Actions is a PHP package that allows developers to organize their application logic into single-action classes, making the codebase cleaner and easier to maintain. By encapsulating business logic into self-contained classes, developers can improve code readability, reusability, and testability. This library promotes best practices in Laravel development and helps developers build scalable and maintainable applications effortlessly.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 2.9.1

Download Download v2.9.1

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/lorisleiva/laravel-actions/2.9.1/loader.php';
require_once 'libs/sebastianbergmann/phpunit/12.4.1/loader.php';
require_once 'libs/illuminate/support/12.33.0/loader.php';

use Lorisleiva\Actions\Concerns\AsAction;
use Lorisleiva\Actions\Concerns\AsController;
use PHPUnit\Framework\TestCase;

$obj = new AsAction();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.