laravel-conventions

Enforce modern Laravel 11+ coding conventions with Pint linting.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/The-Rabak/naysmith --skill laravel-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-conventions
Source: https://github.com/The-Rabak/naysmith/tree/main/.github/skills/laravel-conventions
Command: npx skills add https://github.com/The-Rabak/naysmith --skill laravel-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This reference helps developers adopt and enforce modern Laravel coding conventions for Laravel 11+ and PHP 8.3+ projects.

Core Features & Use Cases

  • Controller -> FormRequest -> Action/Service -> Model: promotes thin controllers and clear separation of concerns.
  • DTOs, Enums, typed properties, and PSR-12-compliant structure to improve readability and maintainability.
  • Use Case: teams migrating legacy Laravel apps can align their codebase and reviews to the standards described here to reduce technical debt and speed onboarding.

Quick Start

Refactor a Laravel 11+ project to follow the Controller -> FormRequest -> Action/Service -> Model pattern and enforce PSR-12 with Pint linting.

Frequently Asked Questions about laravel-conventions

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

FAQPage Schema
What are the modern Laravel 11 and PHP 8.3 coding conventions for structuring applications?

Modern Laravel coding conventions enforce a Controller -> FormRequest -> Action/Service -> Model pattern to promote thin controllers and clear separation of concerns. This architecture uses DTOs, Enums, typed properties, and PSR-12 compliance to improve readability and maintainability.

How do I refactor a legacy Laravel codebase to use modern architecture patterns?

To refactor legacy Laravel apps, align your codebase to the Controller -> FormRequest -> Action/Service -> Model pattern and enforce PSR-12 with Pint linting. This reduces technical debt and speeds up onboarding by ensuring convention compliance across all project files.

Does this Laravel coding convention standard require strict types and PSR-12 compliance?

Yes, these Laravel coding conventions require strict types, typed properties, readonly DTOs, and PSR-12-compliant structure. Pint linting is used to maintain consistency and ensure convention compliance across Controllers, FormRequests, Actions, Models, Migrations, and Tests.

Can I use these coding standards for PHP 8.3 projects that are not on Laravel 11?

No, these conventions are specifically designed for Laravel 11+ projects running PHP 8.3+. They enforce the Laravel 11+ directory structure and specific framework components like FormRequests and Eloquent Models, which are not applicable to non-Laravel PHP applications.

Why does my Laravel code review fail Pint linting checks?

Laravel code reviews fail Pint linting when the code lacks strict types, typed properties, or violates PSR-12 structure. Enforcing the Controller -> FormRequest -> Action/Service -> Model pattern with readonly DTOs and Enums ensures compliance and resolves linting inconsistencies.

What is the best way to enforce separation of concerns in Laravel 11 controllers?

The best way to enforce separation of concerns in Laravel 11 is by adopting a thin controller architecture. Route requests through FormRequests for validation, delegate business logic to Action/Service classes, and interact with Models, ensuring PSR-12 compliance through Pint linting.