Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Action

Laravel Action Laravel Package

cleaniquecoders/laravel-action

A lightweight Laravel package for organizing business logic into reusable, testable action classes. Run actions through a clean pipeline with built-in validation, authorization, and hooks, keeping controllers thin and complex workflows easy to reason about and maintain.

View on GitHub
Deep Wiki
Context7

Simple Actionable for Laravel

Frequently asked questions about Laravel Action
How do I install cleaniquecoders/laravel-action?
Install it with composer require cleaniquecoders/laravel-action and let Laravel package auto-discovery register the service provider. The expected footprint is a single provider plus an abstract base Action class, with no migrations or config publishing. After installing, run your existing test suite and pin the dependency with a caret constraint for controlled upgrades.
Which Laravel and PHP versions does laravel-action support?
Version 2.3.0 explicitly includes Laravel 13 in its illuminate constraints alongside earlier majors, and its CI matrix is standardized on Laravel 12 with PHP 8.4 and 8.3. That matches a modern PHP platform floor and reduces the risk of a forced fork at the next Laravel upgrade. Check your pinned Laravel and PHP versions against the package's effective compatibility matrix before committing, because the 2.3.0 constraint floor may conflict with older Laravel pins.
What is the Laravel Action pattern and when should I use this package?
The Action pattern puts one unit of business logic into a single-purpose invokable class, so controllers stay thin and workflows become explicit use cases. This package is a good fit for codebases already moving toward thin controllers and reusable action classes. It is unnecessary for CRUD-heavy applications that are well served by simple service layers, because the pattern's value depends on consistency and convention.
How does laravel-action handle validation and authorization?
The package advertises built-in validation and authorization as part of running an action through its pipeline, so those checks can live with the action rather than in the controller. The provided overview does not list exact method signatures, so confirm the precise API in the README or source before standardizing a house convention. Keep validation rules and authorization checks close to the action, and test them through the same pipeline you use in production.
Can I use hooks or pipeline stages in laravel-action?
Yes. The package is described as running actions through a clean pipeline with hooks, which lets you attach cross-cutting behavior around an action without scattering it through controllers. Hook names, ordering, and return-value behavior should be confirmed in the package documentation because the excerpt here does not enumerate them. Use hooks for concerns such as logging, transactions, or audit trails only after you have tested their interaction with validation and authorization.
Does laravel-action require migrations or config publishing?
No. The expected integration footprint is a single auto-discovered service provider and an abstract base Action class, with no migrations and no config publishing. That keeps installation additive and avoids database or configuration changes in your application. A short spike in a scratch branch is still worthwhile to confirm there are no service-provider side effects in your environment.
How do I test action classes built with laravel-action?
Because actions are ordinary invokable classes, you can instantiate an action and call it directly in a unit test, or run it through the package pipeline to cover validation, authorization, and hooks. Use Laravel's testing helpers for framework dependencies and assert the action's observable result rather than its internals. The PHPUnit 12 and Pest 4 changes in 2.3.0 appear to be development and CI tooling updates, not runtime test-support code shipped to consumers, but verify that in the package source if test-support code matters to you.
Is laravel-action safe for production and actively maintained?
The technical risk is low because the package is small, additive, and does not own routing, persistence, auth, or transport concerns. The real risks are organizational: a single-maintainer or small-org project, narrow scope, no stated commercial support, and runtime behavior that has not been independently verified here. The 2.3.0 release tracking Laravel 13, PHPUnit 12, and Pest 4 is a positive maintenance signal; still, validate it with a scratch-branch spike and a pilot refactor, and keep the dependency pinned.
How do I upgrade laravel-action from 2.2.0 to 2.3.0?
From 2.2.0 to 2.3.0, bump the constraint, run composer update, and execute the full test suite while confirming the resolver does not downgrade illuminate/* packages. No runtime breaking change is advertised, so code edits should not be required. The bigger decision is adoption itself, so treat 2.3.0 as the entry point rather than a migration target and establish naming, return types, transaction boundaries, and validation placement before broad use.
What are alternatives to laravel-action for organizing business logic?
Alternatives include writing your own invokable action classes, using Laravel service classes, or adopting a broader action package such as lorisleiva/laravel-actions. cleaniquecoders/laravel-action is deliberately lightweight and focuses on a pipeline with validation, authorization, and hooks, so compare it on runtime surface area, maintenance signals, and fit with your existing service or repository layers. If your application is CRUD-heavy with simple service layers, a dedicated action package may add convention without enough payoff.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels