laravel-expert
SolidLaravel/PHP gotchas and decision criteria. Covers N+1 prevention, Eloquent traps, and migration safety.
AI & Automation 24 stars
3 forks Updated today MIT
Install
Quality Score: 85/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
> **AI-consumed reference.** Optimized for Claude to read during execution.
> Human-readable explanation: see [docs/architecture/HIERARCHICAL_PLANNING.md](../../../docs/architecture/HIERARCHICAL_PLANNING.md)
> or [docs/getting-started/](../../../docs/getting-started/) depending on topic.
# Laravel Expert — Gotchas & Decisions
Use Context7 for full Laravel docs.
## Key Decisions
```toon
decisions[4]{choice,use_when}:
Form Request vs inline,"Form Request for reusable validation. Inline for one-off simple checks"
Service vs Action class,"Service for stateless business logic. Action (single __invoke) for discrete operations"
Event/Listener vs direct,"Events for decoupling (notifications/logging). Direct for tightly coupled ops"
Eloquent vs Query Builder,"Eloquent for domain models with relationships. Query Builder for reports/bulk ops"
```
## Gotchas
- N+1: always `with()` eager load. Use `preventLazyLoading()` in AppServiceProvider to catch in dev
- `readonly` DTOs (PHP 8.2+): `readonly class UserData { public function __construct(public string $name) {} }`
- `updateOrCreate` is NOT atomic — race condition possible. Use DB transaction for critical ops
- `$model->save()` returns bool, not the model — don't chain. `Model::create()` returns the model
- Mass assignment: `$fillable` whitelist or `$guarded = []` (never use `$guarded = []` with user input)
- `firstOrFail()` throws `ModelNotFoundException` (404). `first()` returns null silently
- Queue jobs: always implem...
Details
- Author
- nguyenthienthanh
- Repository
- nguyenthienthanh/aura-frog
- Created
- 8 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
flutter-expert
Flutter/Dart gotchas and decision criteria. Covers Riverpod vs BLoC, widget optimization, and platform-specific pitfalls.
24 Updated today
nguyenthienthanh AI & Automation Solid
nodejs-expert
Node.js gotchas and decision criteria. Covers async pitfalls, Express/NestJS patterns, and common mistakes.
24 Updated today
nguyenthienthanh AI & Automation Solid
python-expert
Python gotchas and decision criteria. Covers async pitfalls, FastAPI/Django patterns, and type hint traps.
24 Updated today
nguyenthienthanh