laravel-patterns

Define conventional Laravel project layouts with controller-service-action patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/caovinhphuc/React-OAS-Integration-v4.0 --skill laravel-patterns-caovinhphuc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/caovinhphuc/React-OAS-Integration-v4.0/tree/main/.claude/skills/laravel-patterns
Command: npx skills add https://github.com/caovinhphuc/React-OAS-Integration-v4.0 --skill laravel-patterns-caovinhphuc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines Laravel application design by providing repeatable, scalable architecture patterns that improve maintainability and collaboration across teams.

Core Features & Use Cases

  • Conventional project layout for Laravel apps with clear layers: HTTP (controllers), services/actions, and domain models.
  • Routing and controllers patterns, Eloquent ORM usage, repositories, and service bindings to promote testability.
  • Support for queues, events, caching, and API resources to build production-ready APIs and background processing.
  • Use case: large Laravel applications with multiple teams can adopt these patterns to reduce coupling and accelerate delivery.

Quick Start

Adopt a conventional Laravel layout with clear layer boundaries (HTTP, services, models) and wire controllers to services for orchestrating domain logic.

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 scalable Laravel application architecture for multiple teams?

Structure a scalable Laravel application by adopting a conventional project layout with clear layer boundaries: HTTP controllers, service and action layers, and domain models. This reduces coupling and accelerates delivery across large teams.

What is the controller-service-action pattern in Laravel routing?

The controller-service-action pattern in Laravel separates HTTP routing and request handling from domain logic by wiring controllers to dedicated service classes. This orchestrates business operations while promoting testability and maintainability.

How do I use Laravel Eloquent repositories and service bindings?

Use Laravel Eloquent repositories and service bindings by defining repository classes for data access and binding them via service providers. This abstracts Eloquent ORM usage, centralizes queries, and promotes testable domain models.

Can I use Laravel API resources with queues and events for production APIs?

Yes, Laravel API resources work seamlessly with queues, events, and caching to build production-ready APIs. This combination supports background processing, data transformation, and scalable event-driven applications.

What's the best way to organize a Laravel directory structure for maintainability?

The best way to organize a Laravel directory structure for maintainability is defining clear layers for HTTP, services, and models. This conventional layout applies repository bindings and global scopes to enforce boundaries.

When should I not use a service layer in Laravel?

You should reconsider a service layer in Laravel when building small, simple applications with minimal domain logic. The overhead of strict architectural patterns, repository bindings, and action classes benefits large, complex projects most.