
Laravel Best Practices
This is a comprehensive reference for writing and reviewing Laravel code, covering everything from N+1 prevention and query optimization to queue configuration and error handling. What stands out is the "Consistency First" principle at the top: it explicitly tells you to match your codebase's existing patterns even if these rules suggest something different, which is the right call for real projects. The quick reference format makes it scannable when you're mid-task, and it goes deep on performance patterns like subquery techniques and compound indexes. Apply it when touching any Laravel backend code, from controllers and models to jobs and migrations. It assumes you know Laravel basics and focuses on decisions that actually matter at scale.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 11
- skills.sh installs
- 2.4K
- GitHub stars
- 3.7K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add laravel/boost --skill laravel-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Laravel best practices
Best practices for Laravel, organized as an index of rule files. Each rule file teaches what to do and why. For exact API syntax, verify with search-docs.
Consistency first
Before applying any rule, check what the application already does. Laravel offers several valid approaches. The best choice is the one the codebase already uses, even if another pattern would be better in theory. Inconsistency is worse than a suboptimal pattern.
Check sibling files and related controllers, models, or tests for established patterns. If one exists, follow it. Don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides.
How to apply
Sponsors
Details
- Repository
- github.com/laravel/boost
- Categories
- Backend & APIs, Security, Documentation, Code Review & Quality, Debugging, PHP & Laravel
- First seen
- Jun 3, 2026