laravel-actions

Standardize Laravel action classes with the lorisleiva/laravel-actions package.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/edstevo/standards --skill laravel-actions-edstevo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-actions
Source: https://github.com/edstevo/standards/tree/main/resources/boost/skills/laravel-actions
Command: npx skills add https://github.com/edstevo/standards --skill laravel-actions-edstevo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill standardizes the creation and usage of action classes in Laravel applications, promoting a clean, maintainable, and testable codebase by adhering to the one-class-one-task principle.

Core Features & Use Cases

  • Standardized Action Classes: Enforces a consistent structure for business logic using lorisleiva/laravel-actions.
  • Clearer Codebase: Organizes actions in app/Actions or domain-specific folders with verb-led naming.
  • Simplified Testing: Provides package-native mocking and spying for easier unit and integration testing.
  • Use Case: Refactor a large, monolithic service class into smaller, focused action classes that are easier to understand, test, and reuse across your Laravel application.

Quick Start

Use the laravel-actions skill to create a new action class for processing user signups.

Frequently Asked Questions about laravel-actions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a large Laravel service class into single-purpose action classes?

Refactoring a large Laravel service class involves breaking monolithic logic into single-purpose action classes. This standardizes business logic into reusable, testable units organized in `app/Actions` or domain-specific directories using verb-led naming conventions.

What is the one-class-one-task principle in Laravel applications?

The one-class-one-task principle in Laravel isolates specific business operations into distinct action classes. This approach enforces single responsibility, container resolvability, and consistent invocation using `::run()` for simplified unit testing and maintenance.

Does the laravel-actions approach work with native Laravel Jobs for queued tasks?

The laravel-actions approach distinguishes action classes from native Laravel Jobs for queued tasks. Actions standardize synchronous business logic execution via `::run()`, while native Laravel Jobs should remain the primary mechanism for handling queued asynchronous operations.

Can I use laravel-actions to simplify testing and mocking of business logic?

You can use laravel-actions to simplify testing and mocking of business logic. The standardized action classes provide package-native mocking and spying capabilities, making unit and integration testing significantly easier when validating isolated tasks.

When should I not use action classes in my PHP application?

You should not use action classes in your PHP application for queued tasks or cross-cutting concerns. Actions are designed for standardizing synchronous business logic, while native Laravel Jobs are better suited for asynchronous queued operations.