laravel-13-patterns

Guide Laravel 13 application development with best practices and patterns.

8|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/elmochilyas/laraskills --skill laravel-13-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-13-patterns
Source: https://github.com/elmochilyas/laraskills/tree/main/skills/laravel-patterns
Command: npx skills add https://github.com/elmochilyas/laraskills --skill laravel-13-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to best practices and patterns for building Laravel 13 applications, ensuring consistent, maintainable architecture.

Core Features & Use Cases

  • Laravel 13 Patterns: Covers a wide range of patterns, including attribute-driven models, modular structure, Actions, Services, DTOs, Eloquent best practices, Queues, Caching, API Resources, and Event-driven design.
  • Model Attributes: Introduces PHP 8 attribute-driven model configuration in Laravel 13.
  • Queue Job Attributes: Explains how to use attributes for queue jobs.
  • Console Command Attributes: Demonstrates how to use attributes for console commands.
  • Modular/Domain Structure: Provides guidelines for organizing Laravel applications.
  • Actions vs Services: Offers guidance on when to use Actions and Services.
  • DTOs and Value Objects: Explains the use of DTOs and Value Objects for request data and domain logic.
  • Eloquent Best Practices: Offers quick references for Eloquent relationships, performance, model design, and advanced features.
  • Form Requests: Describes how to use Form Requests for validation and authorization.
  • API Resources: Explains how to create consistent API response envelopes.
  • Queues: Provides information on job structures, batching, and unique jobs.
  • Events and Listeners: Discusses event handling in Laravel.
  • Caching: Covers cache tags, the remember pattern, and model cache invalidation.
  • Policies and Gates: Explains how to use Policies and Gates for authorization.
  • Pipeline Pattern: Shows how to use the Pipeline pattern in Laravel.
  • Service Container: Discusses contextual binding, tagging, and singletons.
  • Rate Limiting: Explains how to implement rate limiting.
  • Blade Components: Provides an example of creating a Blade component.
  • Testing Actions: Offers guidance on testing Actions.
  • Architecture Flow: Describes the recommended architecture flow for Laravel applications.

Quick Start

Use the laravel-13-patterns skill to implement a new feature in your Laravel application by following the best practices and patterns outlined in the skill.

Frequently Asked Questions about laravel-13-patterns

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

FAQPage Schema
How do I structure a Laravel application using Actions, Services, and DTOs?

To structure a Laravel application, use Actions for single-purpose tasks and Services for broader domain logic, while passing request data through DTOs to ensure maintainable, attribute-driven architecture.

What are the best practices for Eloquent relationships and model design in Laravel 13?

Eloquent best practices in Laravel 13 involve using PHP 8 attributes for model configuration, optimizing relationships for performance, and applying advanced features to maintain a clean, domain-driven structure.

How do I implement caching and event-driven design in a Laravel web application?

Implement caching in Laravel by utilizing cache tags, the remember pattern, and model cache invalidation, while using events and listeners to handle side effects and decouple your application's domain logic.

When should I use Policies and Gates for authorization in Laravel?

Use Policies and Gates in Laravel for authorization when you need to organize access control logic, applying rate limiting to protect your API endpoints and manage resource consumption effectively.

Does the Pipeline pattern work with the Laravel service container for complex workflows?

Yes, the Pipeline pattern works with the Laravel service container to process complex workflows through sequential stages, leveraging contextual binding, tagging, and singletons for maintainable data processing.

Do I need to understand PHP 8 attributes to use console commands and queue jobs in Laravel 13?

Yes, understanding PHP 8 attributes is required because Laravel 13 utilizes attribute-driven configuration for defining console commands and queue jobs, ensuring consistent application architecture.