laravilt/actions
Laravilt Actions is a lightweight Laravel package for encapsulating business logic in reusable, testable action classes. It helps keep controllers and models thin with dependency injection, validation, and clean composition for common workflows. Simple to adopt and easy to extend.
composer require laravilt/laravilt) and pull in its companion packages (laravilt/panel, laravilt/actions) at compatible versions — v1.1.1 is a coordinated patch across all three, so keep them in lockstep.config/laravilt.php. Register a panel, then let the package discover your resources. Confirm the resource → model → policy wiring before customising anything.laravilt/laravilt, laravilt/actions, and laravilt/panel together (see laravilt/laravilt#21, #25 and the referenced actions#18 / panel#20 fixes).viewAny, view, create, update, delete, plus custom abilities) and let the resource/action layer consult them. After v1.1.1 these are actually respected for resource permissions, so authorise through policies rather than hand-rolling checks in resource classes.if blocks in the surrounding resource code.actingAs() with users of each role and assert both resource access and action visibility. Because permissions were previously not enforced, add regression tests around the flows covered by #21/#25 so a future upgrade doesn't silently reopen them.Gate::before (or equivalent) rather than sprinkling bypasses through resources; this keeps policy behaviour predictable and auditable.can()/role checks or hid actions defensively to work around the old behaviour, those workarounds are now redundant and may double-gate or conflict. Audit and remove them.php artisan config:clear (and your route/view caches) so the updated permission wiring and any published config changes take effect; stale caches are a common source of "the fix didn't work".Gate::before/Gate::after for cross-cutting rules; reserve resource-level overrides for genuine presentation concerns so upgrades to the authorisation layer don't require reworking them.How can I help you explore Laravel packages today?