laravel-patterns

Standardize Laravel application architecture with layered controllers, Eloquent models, and service classes.

Updated May 9, 2026
One-click install
npx skills add https://github.com/kk20300113-png/my-claude-skills --skill laravel-patterns-kk20300113-png
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-patterns
Source: https://github.com/kk20300113-png/my-claude-skills/tree/main/laravel-patterns
Command: npx skills add https://github.com/kk20300113-png/my-claude-skills --skill laravel-patterns-kk20300113-png

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the common pain of building disorganized, hard-to-maintain Laravel applications that fail to scale as team size and feature requirements grow, by providing standardized, battle-tested architecture patterns.

Core Features & Use Cases

  • Standardized Project Layout: Provides a clear, layered directory structure separating HTTP controllers, service/action classes, and Eloquent models to eliminate code sprawl and improve team navigation.
  • Robust Data Layer Patterns: Includes best practices for typed Eloquent models, scoped route bindings, N+1 query prevention, and API resource structuring for consistent, secure data handling.
  • Production Hardening: Covers implementation patterns for queues, events, caching, database transactions, and environment configuration to build reliable, high-performance Laravel applications.
  • Use Case: A team building a multi-tenant SaaS product can use these patterns to enforce consistent access control, avoid cross-tenant data leaks, and scale background job processing without rewriting core application architecture.

Quick Start

Use the laravel-patterns skill to refactor your existing Laravel application's controllers to follow the thin-controller, service-oriented pattern outlined in the skill's guidelines.

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 production scaling and team collaboration?▼

To structure Laravel applications for production scaling, use a standardized, layered directory separating thin HTTP controllers, service action classes, and Eloquent models to eliminate code sprawl and improve team navigation.

What is the best way to prevent N+1 query problems and handle data securely in Laravel Eloquent ORM?▼

The best way to prevent N+1 query problems in Laravel Eloquent ORM is applying robust data layer patterns, including typed models, scoped route bindings, and consistent API resource structuring for secure data handling.

How do I implement database transactions and cache invalidation strategies in Laravel backend architecture?▼

Implement database transactions and cache invalidation strategies in Laravel backend architecture by utilizing production hardening patterns for queues, events, and environment configuration to ensure reliable, high-performance execution.

When do I need to refactor Laravel controllers to a service-oriented architecture?▼

You need to refactor Laravel controllers to a service-oriented architecture when your application develops inconsistent, unmaintainable code that hinders scaling, allowing you to enforce standardized dependency injection and business logic separation.

Does this Laravel architecture pattern support multi-tenant SaaS background job processing?▼

Yes, these Laravel architecture patterns support multi-tenant SaaS applications by enforcing consistent access control, preventing cross-tenant data leaks, and scaling background job processing without rewriting core architecture.

Why does inconsistent Laravel application architecture hinder scaling and team collaboration?▼

Inconsistent Laravel application architecture hinders scaling because disorganized code sprawl prevents teams from navigating features efficiently, requiring standardized production patterns to enforce maintainable dependency injection and data handling.