laravel-patterns

Organize Laravel projects into layered controllers, services, and actions.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/mitul-bhatia/Vibes --skill laravel-patterns-mitul-bhatia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/mitul-bhatia/Vibes/tree/main/.github/skills/laravel-patterns
Command: npx skills add https://github.com/mitul-bhatia/Vibes --skill laravel-patterns-mitul-bhatia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing Laravel applications can become tangled as projects grow; this guide provides production-grade architecture patterns to keep code maintainable and scalable.

Core Features & Use Cases

  • Clear layer boundaries (HTTP, services/actions, models) to separate concerns.
  • Controllers -> Services -> Actions pattern with single-purpose actions and orchestrations.
  • Routing, route-model binding, and conventional Laravel structure for predictable, secure code.
  • Eloquent ORM patterns, resource controllers, migrations, and API resources for consistent data access.
  • Queues, events, caching, and background jobs to optimize performance and reliability.
  • Centralized config and environment-aware patterns to simplify deployments.

Quick Start

To apply these patterns, structure your Laravel project with clear layers (Controllers, Services, Actions) and adopt conventional routing, bindings, and resource patterns to build maintainable APIs.

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?

To structure a scalable Laravel application, organize your project around clear layer boundaries separating HTTP, services, and models. Apply the Controllers, Services, and Actions pattern with single-purpose actions to enforce clear boundaries and separate concerns.

What is the Controllers, Services, and Actions pattern in Laravel?

The Controllers, Services, and Actions pattern in Laravel routes HTTP requests through controllers to orchestrate services, which then execute single-purpose actions. This architecture enforces clear boundaries, separates concerns, and ensures predictable behavior in production applications.

How do I use Eloquent ORM patterns and API resources for data access in Laravel?

Using Eloquent ORM patterns and API resources in Laravel involves applying resource controllers, migrations, and route-model binding for consistent data access. This approach ensures typed models and explicit bindings enforce predictable, secure API data handling.

When should I use queues, events, and caching in Laravel production apps?

Use queues, events, and caching in Laravel production apps to optimize performance and reliability for background jobs. Implement these features alongside centralized configuration and environment-aware patterns to support reliable deployments and handle heavy asynchronous processing.

Can I apply conventional Laravel routing and bindings to secure my APIs?

You can apply conventional Laravel routing, route-model binding, and explicit bindings to secure your APIs. This architecture ensures typed models and centralized configuration enforce predictable, secure code behavior across your production application endpoints.

Does this Laravel architecture pattern support large production deployments?

This Laravel architecture pattern supports large production deployments by using centralized config and environment-aware patterns. Organizing projects around layered architecture with queues and caching ensures maintainability, reliable deployments, and scalable performance.