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 Actions

Laravel Actions Laravel Package

andrey-helldar/laravel-actions

Laravel Actions lets you encapsulate business logic in reusable action classes and run them as controllers, jobs, listeners, or console commands. With an expressive API and Laravel-friendly conventions, it keeps applications cleaner, more testable, and free of duplicated code.

View on GitHub
Deep Wiki
Context7

🚀 Performing any actions during the deployment process

Frequently asked questions about Laravel Actions
How do I install andrey-helldar/laravel-actions in a Laravel application?
Install it with Composer using composer require andrey-helldar/laravel-actions, then publish the package configuration if you plan to tune queue locking or job overrides. Laravel package auto-discovery registers the service provider, so a manual provider entry is usually unnecessary. After that you can create action classes and expose them as controllers, jobs, listeners, or console commands.
Which Laravel and PHP versions does laravel-actions support?
Check the composer.json constraints on Packagist for the exact Laravel and PHP versions supported by the release line you install. The 7.3.0 update is described as additive and corrective with no deprecations or breaking changes, so it should slot into a supported version without code changes. Always validate against your application's Laravel version and queue driver before promoting to production.
How do I run an action as a queued job with uniqueness locking?
Actions can be dispatched as queued jobs, and the package applies uniqueness locking so the same action is not processed concurrently. Configure the lock duration to match your expected job runtime and queue latency. Exercise the flow under concurrent load in staging to confirm duplicate suppression behaves as intended.
How do I configure the lock duration for queued actions in version 7.3.0?
Version 7.3.0 makes the lock duration configurable through the package configuration file, so you can tune it per environment. Set it slightly longer than your longest expected processing time to prevent duplicate runs while still allowing recovery after worker failures. Avoid very short values, which can permit duplicate execution, and very long values, which can delay legitimate retries.
How do I override the default queue job class used by laravel-actions?
The queue.job configuration value lets you point dispatch at an application-owned job class instead of the package default. That is useful when you need custom middleware, tracing, tenant context, or a standardized retry policy. Keep the custom class compatible with the package's expected contract and queue behavior, and test dispatch and retries after switching.
How does laravel-actions handle the --isolated flag for console commands?
Laravel's --isolated flag prevents overlapping runs of the same scheduled command, and 7.3.0 aligns the package's behavior with Laravel core semantics. If you rely on command isolation, re-run your scheduled-command tests after upgrading to confirm overlap behavior. The change is a fix rather than a breaking change, but it can affect edge cases in custom commands.
How should I test action classes built with laravel-actions?
Action classes are ordinary PHP classes, so you can instantiate them directly in unit tests and assert on their return values. For queued behavior, use Laravel's Queue::fake() and assert that the expected jobs were pushed. Add integration tests with a real queue driver when tuning lock duration or a custom job class.
What happens if the lock duration is too short or too long for queued actions?
A lock duration shorter than the job's real runtime can let a second worker start the same action, producing duplicate processing. A duration that is too long can block retries or leave work stuck after a worker failure. Choose a value based on measured processing times and queue latency, and revisit it as load changes.
How does laravel-actions compare to other Laravel action packages?
Several packages follow a similar pattern, including lorisleiva/laravel-actions, which also lets you run action classes as controllers, jobs, listeners, and commands. Compare the configuration surface, locking behavior, Laravel version support, and maintenance cadence before choosing. If you mainly need queued uniqueness and command isolation, the lighter feature set here may be enough.
Is release 7.3.0 a breaking change and how do I upgrade safely?
7.3.0 is a minor release with additive configuration and a fix for console --isolated behavior, so it should be a routine dependency bump. Update the package, reconcile any published config, and only set a custom lock duration or queue.job override if you have tested them. Roll back by pinning the previous version if you see unexpected command overlap or job dispatch behavior.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections