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-code

Installs 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
1affaan-m avatarlaravel-verificationaffaan-m/eccVerification loop for Laravel projects: env checks, linting, static analysis, tests with coverage, security scans, and deployment readiness.5.7Kskills.sh installs
2affaan-m avatarlaravel-tddaffaan-m/everything-claude-codelaravel tdd5.1Kskills.sh installs
3mwguerra avatarfilament-resourcemwguerra/claude-code-pluginsGenerate FilamentPHP v4 resources with form, table, relation managers, and actions1.2Kskills.sh installs
4mindrally avatarphp-developmentmindrally/skillsExpert guidance for PHP 8+ development with SOLID principles, PSR standards, and modern best practices1.1Kskills.sh installs
5laravel avatartailwindcss-developmentlaravel/boostAlways invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids992skills.sh installs
6bobmatnyc avatarwordpress-security-validationbobmatnyc/claude-mpm-skillsSecurity-first WordPress development with nonces, sanitization, validation, and escaping to prevent XSS, CSRF, and SQL injection vulnerabilities.618skills.sh installs