laravel-jobs

Background jobs and event listeners for async processing. Use when working with queued jobs, background processing, events, or when user mentions jobs, queues, listeners, events, async processing.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "laravel-jobs" with this command: npx skills add leeovery/claude-laravel/leeovery-claude-laravel-laravel-jobs

Laravel Jobs

Background jobs and event listeners: thin delegation layers to actions.

Core Concept

jobs-listeners.md - Job patterns:

  • Jobs as thin delegation layers
  • Queue configuration
  • Retry logic and timeouts
  • Unique jobs
  • Job middleware
  • Event listeners
  • When to use jobs vs sync actions

Pattern

final class ProcessOrderJob implements ShouldQueue
{
    use Dispatchable, Queueable;

    public function __construct(
        public readonly int $orderId,
    ) {}

    public function handle(ProcessOrderAction $action): void
    {
        $order = Order::findOrFail($this->orderId);

        $action($order);
    }

    public function middleware(): array
    {
        return [new WithoutOverlapping($this->orderId)];
    }
}

// Listener
final class SendOrderConfirmationListener
{
    public function handle(OrderPlaced $event): void
    {
        SendOrderConfirmationJob::dispatch($event->order->id);
    }
}

Jobs delegate to actions. Keep domain logic in actions, not jobs.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

laravel-testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel-quality

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel-architecture

No summary provided by upstream source.

Repository SourceNeeds Review
General

laravel-multi-tenancy

No summary provided by upstream source.

Repository SourceNeeds Review