laravel-patterns

Guides Laravel projects to adopt scalable architecture patterns across controllers, services, models, and resources.

8|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/D0NMEGA/donnyclaude --skill laravel-patterns-d0nmega
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/D0NMEGA/donnyclaude/tree/main/packages/skills/laravel-patterns
Command: npx skills add https://github.com/D0NMEGA/donnyclaude --skill laravel-patterns-d0nmega

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel applications often suffer from tangled architectures as they grow, making routing, controllers, and domain logic hard to maintain and scale.

Core Features & Use Cases

  • Clear layer boundaries (HTTP, services, models) to keep domains clean.
  • Structured project layout with conventional Laravel folders (App, Routes, Resources, Jobs, etc).
  • Guidance on routing, controllers, Eloquent patterns, queues, events, caching, and API resources for production-grade apps.
  • Use case: design a scalable API with clean separation between controllers, services, and domain logic.

Quick Start

Integrate these patterns by updating your Laravel project to adopt the recommended structure and layer boundaries.

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 long-term scalability?

To structure Laravel applications for scalability, enforce clear layer boundaries across HTTP controllers, service classes, and Eloquent models. This separation keeps domain logic clean and ensures maintainability as your web app or API grows.

What is the best way to separate controllers and domain logic in Laravel?

The best way to separate controllers and domain logic in Laravel is implementing a dedicated service layer. Moving business logic into services keeps controllers focused on HTTP requests and routing, maintaining strict domain boundaries.

How do I organize Eloquent models and API resources in a scalable Laravel project?

Organize Eloquent models and API resources by adopting a conventional Laravel folder layout with typed models and explicit bindings. Structured placement of models, resources, and jobs ensures clear domain boundaries and maintainability.

When do I need a service layer in my Laravel API?

You need a Laravel service layer when your API controllers accumulate complex business logic. Moving domain operations into services separates HTTP handling from rules, preventing tangled architecture as your application scales.

Does this Laravel architecture pattern cover queues, events, and caching?

Yes, these Laravel architecture patterns cover queues, events, and caching. The guidelines apply scalable conventions across these components alongside routing and Eloquent, ensuring all production-grade app layers maintain clear boundaries.