laravel-best-practices

Standardize Laravel PHP code review and refactoring decisions.

Updated May 22, 2026
One-click install
npx skills add https://github.com/Nweremizu/ekklesia --skill laravel-best-practices-nweremizu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/Nweremizu/ekklesia/tree/main/.junie/skills/laravel-best-practices
Command: npx skills add https://github.com/Nweremizu/ekklesia --skill laravel-best-practices-nweremizu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write, review, and refactor Laravel code with consistent best practices, reducing bugs, performance issues, and security mistakes across backend development.

Core Features & Use Cases

  • Database performance: Prevent N+1 queries, add efficient eager loading, and choose better query patterns for large datasets.
  • Security and validation: Enforce mass assignment protection, authorization, form requests, CSRF, and safe file upload handling.
  • Architecture and maintainability: Keep controllers thin, extract actions and services, and follow Laravel conventions for models, routing, caching, queues, and testing.
  • Use case: A developer preparing a feature for production can use this Skill to review controllers, models, migrations, Blade views, and jobs for correctness and long-term maintainability.

Quick Start

Ask the skill to review or refactor a Laravel file and apply the most relevant best-practice guidance from this skill.

Frequently Asked Questions about laravel-best-practices

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

FAQPage Schema
How do I review Laravel code for performance and security issues?

To review Laravel code for performance and security, analyze controllers, models, and migrations to prevent N+1 queries, enforce mass assignment protection, and apply authorization rules. This process standardizes refactoring decisions to reduce bugs and maintainable architecture issues across backend workflows.

What is the best way to prevent N+1 queries in Laravel?

The best way to prevent N+1 queries in Laravel is to apply efficient eager loading when retrieving models. Reviewing query patterns for large datasets ensures database performance guardrails are met and reduces unnecessary query execution during backend workflows.

How do I keep Laravel controllers thin and maintainable?

To keep Laravel controllers thin and maintainable, extract actions and services to follow standard Laravel conventions. Refactoring routing, caching, and queues ensures maintainable architecture patterns and improves long-term backend maintainability across development.

How do I enforce validation and authorization in Laravel form requests?

To enforce validation and authorization in Laravel form requests, apply form requests for validation discipline and implement mass assignment protection alongside CSRF handling. This secures backend workflows by ensuring safe file upload handling and proper user authorization.

Does PHP code review work for Laravel Blade views and queues?

PHP code review works for Laravel Blade views, queues, and testing by standardizing refactoring decisions across these components. Applying Laravel conventions ensures correctness and long-term maintainability for features preparing for production.