Laravel Idioms and Patterns

Community

Write idiomatic Laravel that scales.

Authorirahardianto
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents non-idiomatic, tightly coupled Laravel code by guiding agents toward conventions and patterns that improve maintainability, testability, and performance.

Core Features & Use Cases

  • Eloquent query patterns: Encourages scopes for reusable queries and eager loading to avoid N+1 queries in API-heavy apps.
  • Service layer separation: Moves business logic out of controllers to keep endpoints thin and easier to test and evolve.
  • Validation and testing conventions: Uses Form Requests for validation and promotes Pest/PHPUnit patterns with factories and isolated database tests.
  • Formatting and static analysis workflow: Recommends Laravel Pint, PHPStan/Larastan, and composer audit to keep code consistent and safer over time.

Quick Start

Ask your AI agent to refactor your Laravel endpoint so it uses a Form Request for validation, a service layer for business logic, and Eloquent scopes with eager loading, then add a Pest test with factories that asserts the created record exists in the database.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Laravel Idioms and Patterns
Download link: https://github.com/irahardianto/awesome-agv/archive/main.zip#laravel-idioms-and-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.