laravel-patterns

Organize Laravel projects into layered HTTP, service, and model architectures.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/contentbugvideoediting/cb-project-assistant --skill laravel-patterns-contentbugvideoediting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/contentbugvideoediting/cb-project-assistant/tree/main/services/cb-s-claude/vendor/s-claude/skills-library/laravel-patterns
Command: npx skills add https://github.com/contentbugvideoediting/cb-project-assistant --skill laravel-patterns-contentbugvideoediting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardizes Laravel project structure to improve maintainability, testability, and collaboration by providing proven patterns for organizing HTTP controllers, services, domain logic, models, and APIs.

Core Features & Use Cases

  • Clear layering: HTTP controllers -> Services -> Actions -> Models.
  • Eloquent-centric patterns for models, relationships, scopes, and value objects.
  • Routing conventions, route model binding, and resource controllers for consistent APIs.
  • Service container bindings, factories, migrations, form requests, and validation.
  • API Resources, queues, events, and caching to optimize performance and scalability.
  • Real-world example: build a modular Laravel app with a Projects module, Users domain, and API resources following the recommended layout.

Quick Start

Create a Laravel project following the recommended structure, then implement a sample module using controllers, services, actions, models, and an API resource.

Frequently Asked Questions about laravel-patterns

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

FAQPage Schema
How do I structure a Laravel application for scalability and maintainability?

Structure Laravel applications for scalability by enforcing clear layering across HTTP controllers, services, actions, and Eloquent models. This separation isolates domain logic from routing and API resources, improving testability and collaboration.

What is the best way to organize Eloquent models and relationships in large Laravel projects?

Organize Eloquent models in large Laravel projects using dedicated patterns for relationships, scopes, and value objects. This keeps domain logic encapsulated within models rather than scattered across controllers.

How do I set up Laravel service container bindings and form requests for APIs?

Set up Laravel APIs by defining explicit service container bindings, utilizing form requests for validation, and standardizing responses through API resources. This creates consistent, maintainable HTTP endpoints.

Can I use Laravel events, jobs, and caching patterns to optimize application performance?

Use Laravel events, jobs, and caching patterns to optimize application performance by offloading heavy processing to queues. This architecture ensures scalable background execution for API resources and services.

When should I implement action classes in my Laravel architecture?

Implement action classes in Laravel architecture when you need to isolate specific single-use domain operations between services and models. This pattern prevents controllers and services from becoming bloated with business logic.

Does this Laravel architecture pattern support modular project layouts with separate domains?

This Laravel architecture pattern supports modular project layouts by organizing code into distinct modules like Projects and Users domains. It applies explicit route model binding and resource controllers for separated API endpoints.