laravel-jobs

Automates Laravel background processing with Jobs, Listeners, Actions, and ShouldQueue.

1|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/nextplus896/durra-alaseel --skill laravel-jobs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-jobs
Source: https://github.com/nextplus896/durra-alaseel/tree/main/.github/skills/claude-laravel/laravel-jobs
Command: npx skills add https://github.com/nextplus896/durra-alaseel --skill laravel-jobs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill standardizes and documents how to implement background jobs and event listeners in Laravel, enabling asynchronous processing, queue management, and clean delegation of work to actions.

Core Features & Use Cases

  • Thin delegation: Jobs and Listeners delegate work to Actions.
  • Queue configuration and retry/timeout patterns.
  • Event-driven processing with multiple listeners per event.
  • Serialization best practices and error handling.

Quick Start

Provide a minimal Laravel example: a Job implementing ShouldQueue that delegates to an Action, a Listener for an Event, and queue configuration with retries. Also show how to dispatch a Job from the Event.

Frequently Asked Questions about laravel-jobs

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

FAQPage Schema
How do I automate Laravel background tasks with queued jobs?

Automate Laravel background tasks by creating Jobs that implement ShouldQueue and delegate execution to Actions. This pattern standardizes asynchronous processing, enabling queue management, retries, and timeouts for heavy operations without blocking the main request cycle.

What is the best way to structure Laravel event listeners and jobs?

The best way to structure Laravel event listeners and jobs is using thin delegation, where Listeners and Jobs delegate work to Actions. This separates dispatch logic from business logic, standardizing event-driven workflows and keeping queued tasks maintainable.

How do I configure retries and timeouts for Laravel queued jobs?

Configure retries and timeouts for Laravel queued jobs by setting properties on Jobs implementing ShouldQueue. This defines queue behavior for cross-cutting concerns, ensuring background tasks fail gracefully and retry according to your application's error handling patterns.

How do I dispatch a Laravel job from an event listener?

Dispatch a Laravel job from an event listener by calling the job's dispatch method within the listener class. This delegates the asynchronous work to a queued Action, enabling event-driven processing without delaying the original event broadcast.

What are serialization best practices for Laravel background jobs?

Serialization best practices for Laravel background jobs involve passing only necessary data to queued jobs and avoiding complex object graphs. This prevents serialization errors and ensures Actions receive clean data when processing background tasks asynchronously.

Does this Laravel queue approach work for event-driven workflows?

Yes, this Laravel queue approach works for event-driven workflows by using Listeners to handle events and delegate to Actions. It supports multiple listeners per event, allowing you to process cross-cutting concerns asynchronously via queued jobs.