
Laravel Patterns
This is a solid reference for structuring production Laravel apps the way experienced teams actually do it: thin controllers that delegate to actions or services, explicit repository bindings, scoped route model binding to prevent cross-tenant leaks, and typed models with casts and scopes. It covers the full stack from routing conventions and form requests through Eloquent patterns, eager loading, query objects, transactions, and background jobs. The examples are concrete and opinionated in a good way, like using `scopeBindings()` for nested routes and keeping a consistent folder layout with Actions and Services directories. Use this when you want a coherent architecture instead of piling everything into controllers or falling into N+1 traps.
- skills.sh installs
- 5.8K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill laravel-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Category
- PHP & Laravel
- First seen
- Apr 16, 2026
More from affaan-m/everything-claude-code
All 256- Clickhouse Io5.7K
- Eval Harness5.7K
- Laravel Security5.7K
- Cpp Testing5.6K
- Iterative Retrieval5.6K
- Agent Harness Construction5.5K
- Configure Ecc5.5K
- Nutrient Document Processing5.5K
- Search First5.5K
- Verification Loop5.5K
- Agentic Engineering5.4K
- Cost Aware Llm Pipeline5.4K
- Django Verification5.4K
- Springboot Verification5.4K
- Codebase Onboarding5.3K
- Deep Research5.3K
- Rust Testing5.3K
- Ai First Engineering5.2K
- Autonomous Loops5.2K
- Content Engine5.2K
- Content Hash Cache Pattern5.2K
- Kotlin Coroutines Flows5.2K
- Swiftui Patterns5.2K
- Investor Materials5.1K