laravel-best-practices

Apply Laravel best practices to backend PHP code for maintainability.

Updated May 28, 2026
One-click install
npx skills add https://github.com/EyesLight6/sopitas --skill laravel-best-practices-eyeslight6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/EyesLight6/sopitas/tree/main/sopitas/.agents/skills/laravel-best-practices
Command: npx skills add https://github.com/EyesLight6/sopitas --skill laravel-best-practices-eyeslight6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers avoid common Laravel mistakes by applying consistent, secure, and performance-focused backend development practices across PHP applications.

Core Features & Use Cases

  • Laravel Code Guidance: Provides best practices for controllers, models, migrations, Eloquent queries, routing, validation, jobs, caching, and application architecture.
  • Performance and Security Reviews: Helps identify N+1 queries, inefficient database access, authorization gaps, unsafe input handling, and configuration issues.
  • Refactoring Support: Guides improvements to existing Laravel codebases by aligning implementations with established Laravel conventions and maintainable patterns.

Quick Start

Use the laravel-best-practices skill to review my Laravel controller and suggest improvements for performance, security, and maintainability.

Frequently Asked Questions about laravel-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 query problems in Laravel Eloquent?

Fix Laravel N+1 query problems in Eloquent by applying eager loading relationships and optimizing database access patterns. This approach identifies inefficient queries during code review and refactors them for maintainable performance.

What is the best way to structure Laravel controllers for maintainability?

The best way to structure Laravel controllers for maintainability is by applying framework best practices and architectural patterns. This ensures secure coding, consistent conventions, and optimized validation workflows across your backend application.

How do I review Laravel code for security vulnerabilities and unsafe input?

Review Laravel code for security vulnerabilities by checking for authorization gaps and unsafe input handling. This process identifies configuration issues and applies secure coding patterns to satisfy production-ready backend requirements.

Can I use this approach to refactor existing Laravel migrations and routing?

Yes, you can use this approach to refactor existing Laravel migrations and routing. It guides improvements to existing codebases by aligning implementations with established Laravel conventions and maintainable design patterns.

Does this Laravel optimization guidance cover queues and caching?

Yes, this Laravel optimization guidance covers queues and caching. It provides best practices for jobs, caching, routing, and application architecture to ensure consistent and performance-focused backend development.