laravel-best-practices

Apply Laravel best practices for code review and refactoring.

5|1|Updated Feb 17, 2024
One-click install
npx skills add https://github.com/karuhun-developer/template-laravel-livewire --skill laravel-best-practices-karuhun-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/karuhun-developer/template-laravel-livewire/tree/main/.cursor/skills/laravel-best-practices
Command: npx skills add https://github.com/karuhun-developer/template-laravel-livewire --skill laravel-best-practices-karuhun-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit helps developers write, review, and refactor Laravel code, ensuring best practices are followed, which leads to more efficient, secure, and maintainable applications.

Core Features & Use Cases

  • Code Best Practices: Apply best practices for controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, Eloquent queries, and more.
  • Performance Optimization: Identify and resolve N+1 queries, optimize caching strategies, and improve authorization and security patterns.
  • Error Handling: Implement robust error handling and structured logging.

Quick Start

Apply the laravel-best-practices skill to your Laravel application to improve code quality and performance.

Frequently Asked Questions about laravel-best-practices

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

FAQPage Schema
How do I resolve N+1 query problems in Laravel for better database performance?

Laravel best practices resolve N+1 query problems by prescribing specific Eloquent query patterns and eager loading rules. Applying these guidelines optimizes database performance and ensures efficient data retrieval across your application.

What are the best practices for securing Laravel controllers and routing?

Laravel security best practices for controllers and routing involve applying structured validation rules, authorization policies, and secure HTTP client configurations. This Skill outlines guidelines to enforce robust security patterns across your application architecture.

How do I implement robust error handling and structured logging in Laravel?

Implementing robust error handling and structured logging in Laravel requires following specific architectural conventions and configuration rules. This Skill provides guidelines for handling exceptions, configuring queues, and managing scheduled tasks securely.

Can I use these coding standards for optimizing Laravel caching and task scheduling?

Yes, these coding standards cover optimizing Laravel caching strategies and task scheduling configurations. The guidelines help you configure queues, events, and notifications efficiently to improve overall application performance and maintainability.

What Laravel and PHP experience is required to apply these coding conventions?

Applying these coding conventions requires prior knowledge of the Laravel framework and the PHP programming language. This Skill is designed for developers who need to write, review, and refactor existing Laravel code for better performance and security.