# Ground Laravel

> Laravel philosophy. Convention over config. Eloquent as truth. Invoke ONCE when entering Laravel context.

- Skill: `attac-t/ground-laravel` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add attac-t/ground-laravel`
- Raw SKILL.md: https://api.skillmd.com/api/skills/attac-t/ground-laravel/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: attac-t (https://skillmd.com/u/attac-t)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/attac-t/ground-laravel

---


# Skill: Laravel Philosophy

> "The framework is your friend. Don't fight it."

## The Standard

- **Convention Over Configuration**: Follow Laravel defaults. Custom only when necessary.
- **Eloquent as Truth**: Models own their domain. Don't abstract around the ORM.
- **Thin Controllers**: Controllers route and orchestrate. Actions execute business logic.
- **Batteries Included**: Use Laravel features before packages before custom code.
- **Named Parameters**: Use named arguments for all calls with 2+ parameters. Closures included. Positional args obscure intent.

## The Check

Stop and reconsider if:
- Writing a repository that wraps Eloquent
- Fighting against implicit model binding
- Creating custom solutions for things Laravel provides (gates, policies, events)
- Bypassing Eloquent "for performance" without measuring
- Building a "service layer" that just calls model methods
- Using positional arguments for calls with 2+ parameters

## The Protocol

Before writing any Laravel code:
1. **Check Laravel**: Does the framework solve this natively?
2. **Check Spatie**: Did they already build a well-tested package?
3. **Check Project**: How did we solve similar problems here?
4. **Only Then**: Write custom code.

## The Ecosystem

Trust these conventions:
- Naming: `UserPolicy`, `OrderObserver`, `SendInvoice` (VerbNoun for Actions)
- Config: `config()` over `env()` in application code
- Structure: Follow Laravel's file structure unless documented otherwise
- Packages: Spatie packages are battle-tested — prefer them over custom solutions

