0xdarkmatter/claude-mods/laravel-ops
Claude Code and agent skill by 0xdarkmatter/claude-mods
- community
Checking that the SKILL.md file is still in the repository.
Laravel framework patterns, Eloquent ORM, authentication, queues, and testing. Use for: laravel, eloquent, artisan, blade, php, sanctum, livewire, inertia, pest, phpunit, forge, vapor, queue, middleware, migration, factory, seeder.
Install
npx vskill@latest install 0xdarkmatter/claude-mods/laravel-opsSKILL.md
The same SKILL.md was published earlier as 0xdarkmatter/claude-mods/laravel-ops.
Laravel Operations
Facts verified as of 2026-07.
Authoritative reference for Laravel 11+ development: architecture decisions, Eloquent patterns, authentication strategies, queue configuration, and testing approaches.
Architecture Decision Tree
Action Class vs Repository vs Service
| Pattern | Use When | Example | |
|---|---|---|---|
| Action class | Single, reusable business operation | CreateOrderAction, SendInvoiceAction | |
| Repository | Abstract data access, multiple sources | OrderRepository with EloquentOrderRepository | |
| Service | Orchestrate multiple actions/repos | OrderService combining payment + inventory | |
| Direct Eloquent | Simple CRUD, < 5 lines in controller | User::create($data) |
Eloquent Quick Reference
Relationships
| Relationship | Method | Foreign Key Convention | |
|---|---|---|---|
hasOne | return $this->hasOne(Profile::class) | profiles.user_id | |
hasMany | return $this->hasMany(Post::class) | posts.user_id | |
belongsTo | return $this->belongsTo(User::class) | posts.user_id | |
belongsToMany | return $this->belongsToMany(Role::class) | role_user pivot | |
hasManyThrough | return $this->hasManyThrough(Post::class, User::class) | Country → User → Post | |
morphTo | return $this->morphTo() | {col}_type, {col}_id | |
morphMany | return $this->morphMany(Comment::class, 'commentable') | Polymorphic | |
morphToMany | return $this->morphToMany(Tag::class, 'taggable') | Polymorphic pivot |
Eager Loading
Query Scopes
Mass Assignment
Artisan Command Cheat Sheet
| Command | Purpose | Common Options | |
|---|---|---|---|
make:model Post -mfs | Model + migration + factory + seeder | -c controller, -r resource | |
make:controller PostController -r | Resource controller (7 methods) | --api skips create/edit | |
make:request StorePostRequest | Form request for validation | ||
make:job ProcessPayment | Queueable job class | --sync for sync job | |
make:event OrderPlaced | Event class | ||
make:listener SendOrderConfirmation -e OrderPlaced | Listener for event | --queued | |
make:notification InvoicePaid | Notification class | ||
make:policy PostPolicy -m Post | Policy with model | ||
make:middleware EnsureUserIsAdmin | HTTP middleware | ||
make:command SendDailyReport | Custom Artisan command | ||
migrate | Run pending migrations | --step for individual | |
migrate:rollback | Roll back last batch | --step=5 | |
migrate:fresh --seed | Drop all + re-migrate + seed | ||
db:seed | Run all seeders | --class=UserSeeder | |
tinker | REPL with app context | ||
route:list | Show all routes | --name=api filter | |
route:cache | Cache routes for production | ||
config:cache | Cache config for production | ||
view:cache | Pre-compile Blade templates | ||
optimize | Run all cache commands | optimize:clear to reset | |
queue:work | Process queue jobs | --queue=high,default | |
queue:listen | Work + auto-reload on code change | ||
queue:failed | List failed jobs | ||
queue:retry all | Retry all failed jobs | ||
schedule:run | Run due scheduled tasks | ||
schedule:work | Run scheduler every minute (dev) | ||
key:generate | Generate APP_KEY | ||
test | Run PHPUnit/Pest tests | --filter=UserTest | |
test --parallel | Run tests in parallel | --processes=4 | |
vendor:publish | Publish package assets/config | --tag=config |
Authentication Decision Tree
Sanctum Quick Setup
Queue Decision Tree
Job Patterns
Task Scheduling
Testing Quick Reference
Test Types
| Type | Class extends | Database | Purpose | |
|---|---|---|---|---|
| Feature test | Tests\TestCase | Yes (with trait) | HTTP endpoints, full stack | |
| Unit test | PHPUnit\Framework\TestCase | No | Pure logic, no app boot | |
| Browser test | Laravel\Dusk\TestCase | Yes | Real browser via ChromeDriver |
Database Traits
Pest Syntax (preferred in Laravel 11+)
Common Assertions
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/laravel-ops/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0xdarkmatter/claude-mods/laravel-ops)