laravel-patterns
Master Laravel's architecture through proven patterns for building maintainable, production-ready applications. Covers controller and service layer design, Eloquent modeling with relationships and scopes, API resource structuring, and background job handling with queues and events.
Laravel Patterns teaches production-grade architecture for building scalable, maintainable Laravel applications.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
Laravel Patterns teaches production-grade architecture for building scalable, maintainable Laravel applications. Master Laravel's architecture through proven patterns for building maintainable, production-ready applications. Covers controller and service layer design, Eloquent modeling with relationships and scopes, API resource structuring, and background job handling with queues and events.
Use it when
- laravel-patterns emphasizes clear separation between controllers and services to maintain single responsibility.
- laravel-patterns covers Eloquent ORM mastery including relationships (one-to-many, many-to-many, polymorphic).
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
affaan-m/ECC/laravel-patterns · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What are the core Laravel architecture patterns covered?
laravel-patterns teaches production-grade Laravel architecture and design patterns for building maintainable applications. The skill covers structuring controllers, services, and models with clear boundaries; mastering Eloquent ORM with relationships, scopes, and query optimization; building scalable APIs with resources, routing, and pagination; and implementing queues, events, caching, and background job patterns. You'll learn proven approaches to separate concerns and keep your codebase organized as it grows.
How should I structure Laravel controllers and services?
laravel-patterns emphasizes clear separation between controllers and services to maintain single responsibility. Controllers handle HTTP requests and responses, while services contain business logic. This boundary prevents fat controllers and makes testing easier. The skill teaches how to inject services into controllers via Laravel's service container, organize related business logic into focused service classes, and use action classes for complex operations. This structure scales well as your application grows.
What does laravel-patterns teach about Eloquent ORM best practices?
laravel-patterns covers Eloquent ORM mastery including relationships (one-to-many, many-to-many, polymorphic), query scopes for reusable filtering, and optimization techniques. Key topics include avoiding N+1 queries through eager loading, using global scopes for soft deletes and other cross-cutting concerns, building efficient query builders, and leveraging Eloquent's relationship methods. The skill shows how to structure models with clear relationships and use scopes to keep queries DRY and performant.
How do I build scalable APIs with routing and model binding?
laravel-patterns teaches API design through resource classes for consistent response formatting, nested routes with scoped bindings for clean URL structures, and pagination strategies for large datasets. You'll learn to use implicit and explicit model binding to automatically resolve route parameters, structure API resources to transform Eloquent models into JSON, implement pagination for efficient data delivery, and organize routes logically. These patterns ensure your APIs remain maintainable and performant as they scale.
What background job and event patterns does laravel-patterns cover?
laravel-patterns covers queues for offloading long-running tasks, events and listeners for decoupled communication, and caching strategies for performance. You'll learn to dispatch jobs to background queues, set up event listeners that respond to application events, implement retry logic and failure handling, use caching to reduce database queries, and coordinate multi-step updates with transactions. These patterns keep your application responsive and handle complex workflows reliably.
How does laravel-patterns address form validation and database migrations?
laravel-patterns teaches form validation through request classes that centralize validation rules and custom messages, keeping controllers lean. For databases, you'll learn to structure migrations for schema changes, use transactions for multi-step updates, implement soft deletes with global scopes, and design schemas that support your application's relationships. The skill emphasizes validation as a first line of defense and migrations as version control for your database structure.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Laravel Development Patterns
Production-grade Laravel architecture patterns for scalable, maintainable applications.
When to Use
- Building Laravel web applications or APIs
- Structuring controllers, services, and domain logic
- Working with Eloquent models and relationships
- Designing APIs with resources and pagination
- Adding queues, events, caching, and background jobs
How It Works
- Structure the app around clear boundaries (controllers -> services/actions -> models).
- Use explicit bindings and scoped bindings to keep routing predictable; still enforce authorization for access control.
- Favor typed models, casts, and scopes to keep domain logic consistent.
- Keep IO-heavy work in queues and cache expensive reads.
- Centralize config in
config/*and keep environments explicit.
Examples
Project Structure
Use a conventional Laravel layout with clear layer boundaries (HTTP, services/actions, models).
Recommended Layout
``` app/ ├──
(truncated - see the full file via the links below)
File tree — 1 file
skills/laravel-patterns/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn production-grade Laravel architecture and design patterns”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Laravel Best Practices is a comprehensive reference for building scalable Laravel 13 applications, covering 31 rules organized across architecture, Eloquent patterns, controllers, validation, security, performance, and API design. Use it when structuring applications, creating models and migrations, implementing form requests, or designing APIs. Includes essential patterns for service classes, repositories, form requests, and Eloquent models.
Laravel Specialist guides you through building production-ready Laravel 10+ applications with type-safe Eloquent models, queue workers, API resources, and Livewire components. It enforces modern PHP 8.2+ patterns, eager loading, dependency injection, and >85% test coverage across feature and unit tests. Use it for architecting database schemas, implementing authentication flows, optimizing queries, and validating code against PSR-12 standards.
Get expert guidance on Laravel 12.x application development, from foundational concepts like routing and database migrations to advanced patterns including Eloquent relationships, API design, and authentication with Sanctum. This skill covers the full development lifecycle—models, validation, queues, dependency injection, and best practices for building scalable web applications.
PHP Expert provides in-depth instruction on PHP 8+ language features including union types, named arguments, match expressions, attributes, and enums. Learn Laravel framework patterns, Composer dependency management, and object-oriented design principles for building robust applications.
Laravel Specialist guides you through designing and maintaining Laravel applications at production scale. It covers the full ecosystem—Eloquent relationships and query optimization, Blade and Livewire components, queue systems, middleware pipelines, and Pest testing—with a structured five-phase process from context discovery through optimization.
This skill teaches proven patterns for writing efficient Eloquent queries, from eager loading relationships to selecting only needed columns and using query scopes. Learn how to prevent common performance pitfalls like N+1 queries, implement mass assignment protection, and leverage database-level operations for faster data manipulation.
More skills laravel-database-optimization (MIT) · android-clean-architecture (MIT) · quarkus-patterns (MIT) · laravel-api (MIT)