laravel-patterns

Architect Laravel apps with layered controllers, services, and Eloquent models.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/devopstales/ai-workflow --skill laravel-patterns-devopstales
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/devopstales/ai-workflow/tree/main/skills/laravel-patterns
Command: npx skills add https://github.com/devopstales/ai-workflow --skill laravel-patterns-devopstales

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel projects often become unwieldy as they grow; this Skill provides production-grade architecture patterns to structure code for maintainability, testability, and scalability.

Core Features & Use Cases

  • Layered architecture: controllers, services, and domain logic with clear boundaries.
  • Eloquent-centric data models: standard patterns for relationships, repositories, and data mappers.
  • API resources, queues, events, and caching: patterns to handle asynchronous work and performance at scale.
  • Recommended project layout and conventions: route bindings, service container usage, and config organization.

Quick Start

Install and align your Laravel project with the patterns described to start organizing code around clear layers and pipelines.

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 maintainability and scale?▼

Structure Laravel applications for maintainability by adopting layered architecture with clear boundaries. Separate concerns across controllers, services, and domain logic to enforce conventions and ensure codebase testability as projects grow.

What is the best way to separate concerns in Laravel controllers and services?▼

The best way to separate concerns in Laravel is implementing layered architecture. Keep controllers lightweight by delegating business logic to dedicated service classes, establishing clear boundaries between routing, domain services, and Eloquent data models.

How do I scale Laravel APIs using queues, events, and caching?▼

Scale Laravel APIs by implementing patterns for asynchronous work and performance. Utilize queued jobs for background processing, broadcast events for decoupled actions, and apply caching strategies alongside API resources to optimize response times.

Does this Laravel architecture pattern support Eloquent repositories and data mappers?▼

Yes, this Laravel architecture pattern supports Eloquent-centric data models. It provides standard patterns for managing relationships, repositories, and data mappers, ensuring database interactions remain encapsulated and maintainable.

Can I use these Laravel patterns for both web applications and API development?▼

Yes, you can use these Laravel patterns for both web applications and APIs. The architecture enforces standard conventions like route bindings and service container usage, ensuring clear structures for HTTP requests and API resource transformations.

When should I refactor my Laravel project to use a layered architecture?▼

Refactor your Laravel project to use layered architecture when it becomes unwieldy. If controllers accumulate business logic or testing becomes difficult, adopting service layers and domain boundaries restores maintainability and scalability.