laravel-patterns

Standardize Laravel project structure with architecture patterns for controllers, services, and models.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill laravel-patterns-kanakmalpani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/KanakMalpani/General-Private-Skills/tree/main/skills/laravel-patterns
Command: npx skills add https://github.com/KanakMalpani/General-Private-Skills --skill laravel-patterns-kanakmalpani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel projects often grow into unmanageable codebases. This Skill provides a set of architecture patterns to organize controllers, services, models, and domain logic for maintainability, testability, and scalability.

Core Features & Use Cases

  • Clear layering for HTTP, services, and domain logic to improve separation of concerns.
  • Patterns for routing, Eloquent models, repositories, and API resources to standardize development.
  • Use Case: structure a production Laravel app with services, actions, and well-defined boundaries.

Quick Start

Create a Laravel project and apply the recommended architecture patterns to structure controllers, services, and models.

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 app to prevent the codebase from becoming unmanageable?

To structure a scalable Laravel app, apply proven architecture patterns that establish clear layering for HTTP requests, services, and domain logic. This separation of concerns ensures your project remains maintainable and testable as it grows.

What is the best way to organize Laravel controllers, services, and models for maintainability?

The best way to organize Laravel components is standardizing file layouts with well-defined boundaries. This approach guides controllers, services, actions, and Eloquent models to enforce separation of concerns and improve overall project maintainability.

How do I standardize API resource development and routing in a production Laravel web app?

To standardize API resource development in Laravel, apply architecture patterns for route organization, repositories, and API resources. This creates clear boundaries and typed models for consistent, scalable API development.

Does this Laravel architecture approach support queues, events, and caching?

Yes, this architecture approach supports queues, events, and caching. It provides pattern guidance for these components alongside controllers and services, ensuring clear dependency wiring and best-practice file layouts.

When should I implement service layers and domain logic boundaries in my Laravel project?

You should implement service layers and domain logic boundaries when building a production Laravel app. This structure defines clear boundaries for HTTP, services, and domain logic, preventing unmanageable codebases.

Why does my Laravel project need typed models and dependency wiring for API development?

Your Laravel project needs typed models and dependency wiring to satisfy requirements for clear architectural boundaries. This standardizes development and ensures scalable, maintainable API resources and domain logic.