Laravel

Build robust Laravel apps avoiding Eloquent traps, queue failures, and auth pitfalls.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Laravel" with this command: npx skills add ivangdavila/laravel

Quick Reference

TopicFile
N+1 queries, eager loading, accessors, observerseloquent.md
Validation, middleware order, dependency injectioncontrollers.md
Job serialization, retries, failed jobsqueues.md
Guards, policies, gates, Sanctum tokensauth.md
XSS escaping, components, slotsblade.md
Commands, scheduling, tinkerartisan.md

Critical Rules

  • Eager load relationships — with('posts') not lazy ->posts in loop (N+1)
  • preventLazyLoading() in dev AppServiceProvider — crashes on N+1, catches early
  • env() only in config files — returns null after config:cache
  • $fillable whitelist fields — $guarded = [] allows mass assignment attacks
  • find() returns null — use findOrFail() to avoid null checks
  • Job properties serialize models as ID — re-fetched on process, may be stale/deleted
  • route:cache requires controller routes — closures break cached routes
  • DB::transaction() doesn't catch exit/timeout — only exceptions roll back
  • RefreshDatabase uses transactions — faster than DatabaseMigrations
  • {!! $html !!} skips escaping — XSS vector, use {{ }} by default
  • Middleware order matters — earlier middleware wraps later execution
  • required validation passes empty string — use required|filled for content
  • firstOrCreate persists immediately — firstOrNew returns unsaved model
  • Route model binding uses id — override getRouteKeyName() for slug

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Zip

Zip - command-line tool for everyday use

Registry SourceRecently Updated
General

Youtube Script

YouTube视频脚本、标题A/B测试、缩略图文案、SEO优化、开头Hook、章节标记。YouTube script writer with title testing, thumbnail copy, SEO optimization, hooks, chapter markers. Use when you...

Registry SourceRecently Updated
1760ckchzh
General

Topmediai AI Music Generator

Generate AI music, BGM, or lyrics via TopMediai API. Supports auto polling and two-stage output (preview first, then final full audio) for generation tasks.

Registry SourceRecently Updated
General

Yamlcheck

YAML validator and formatter. Validate YAML syntax, pretty-print with proper indentation, convert between YAML and JSON, and lint YAML files for common issues.

Registry SourceRecently Updated