laravel-best-practices

Standardize Laravel PHP code patterns for architectural consistency and database performance.

Updated Jul 15, 2026
One-click install
npx skills add https://github.com/o2b3k/idomarketingbot --skill laravel-best-practices-o2b3k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/o2b3k/idomarketingbot/tree/main/.cursor/skills/laravel-best-practices
Command: npx skills add https://github.com/o2b3k/idomarketingbot --skill laravel-best-practices-o2b3k

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses inconsistency and performance bottlenecks in Laravel applications by providing a centralized, authoritative index of architectural and coding standards.

Core Features & Use Cases

  • Performance Optimization: Provides rules for preventing N+1 queries, efficient eager loading, and database indexing strategies.
  • Architectural Guidance: Defines patterns for Action classes, dependency injection, and service-oriented design to keep controllers thin.
  • Security & Quality: Enforces best practices for input validation, mass assignment protection, and secure configuration management.

Quick Start

Apply the laravel-best-practices skill to review the current controller implementation for potential N+1 query issues and suggest refactoring based on the database performance rules.

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 issues when reviewing Laravel controllers?

Fix Laravel N+1 query issues by applying eager loading rules and database indexing strategies to standardize code patterns and optimize database performance during controller refactoring.

What is the best way to keep Laravel controllers thin and maintainable?

Keep Laravel controllers thin and maintainable by using Action classes, dependency injection, and service-oriented design patterns to enforce architectural consistency and scalable backend code.

How do I secure Laravel applications against mass assignment and input validation flaws?

Secure Laravel applications against mass assignment and input validation flaws by enforcing secure configuration management and standardizing backend code following official framework conventions.

Does this approach work for refactoring existing Laravel models and migrations?

Yes, this approach works for refactoring existing Laravel models and migrations by applying architectural and coding standards to ensure consistency, secure maintainability, and optimal database performance.

When do I need to standardize PHP code patterns in a Laravel application?

Standardize PHP code patterns in a Laravel application when addressing inconsistency and performance bottlenecks to ensure architectural consistency, secure configuration, and scalable backend development.