laravel-architecture
44
总安装量
23
周安装量
#8817
全站排名
安装命令
npx skills add https://github.com/leeovery/claude-laravel --skill laravel-architecture
Agent 安装分布
opencode
18
codex
16
gemini-cli
16
antigravity
15
github-copilot
14
claude-code
13
Skill 文档
Laravel Architecture
High-level architectural guidance for Laravel applications.
Core Concepts
philosophy.md – Foundational principles:
- Declarative code above all else
- Strict separation of concerns
- Type safety first
- All core architectural principles
patterns.md – Pattern overview:
- Actions for domain logic
- DTOs for data transfer
- State machines for complex state
- Services for external integration
- Workflows for multi-step processes
- Value objects for domain values
decisions.md – Pattern selection:
- When to use each pattern
- Decision flowcharts
- Architectural trade-offs
- Common scenarios
structure.md – Directory structure:
- Complete project organization
- File placement rules
- Namespace conventions
- Web vs API distinction
examples.md – Reference implementations:
- Complete working examples
- End-to-end workflows
- Real-world patterns
checklist.md – Implementation checklist:
- Setup tasks
- Feature development workflow
- Production deployment steps
Core Principles
- Actions contain domain logic – Business logic lives in invokable action classes
- Never pass primitives – Always use DTOs for data transfer
- Thin HTTP layer – Controllers only handle HTTP concerns
- Custom query builders – Type-safe queries over scopes
- Strict typing –
declare(strict_types=1)in every file
Quick Decision Tree
Need to…
- Handle domain logic? â Action
- Transfer data? â DTO
- Validate user input? â Form Request
- Simple state field? â Enum
- Complex state transitions? â State Machine
- External API? â Service with Saloon
- Background processing? â Job (delegates to Action)
Read decision flowcharts in decisions.md for detailed guidance.