brainstorming
Structured design dialogue that validates ideas before implementation begins.
laravel-eloquent
Complete Eloquent ORM - models, relationships, queries, casts, observers, factories. Use when working with database models.
Full skill instructions
Before ANY implementation, launch in parallel:
After implementation, run fuse-ai-pilot:sniper for validation.
Eloquent is Laravel's ActiveRecord ORM implementation. Models represent database tables and provide a fluent interface for queries.
| Feature | Purpose |
|---|---|
| Models | Table representation with attributes |
| Relationships | Define connections between models |
| Query Scopes | Reusable query constraints |
| Casts | Attribute type conversion |
| Events/Observers | React to model lifecycle |
| Factories | Generate test data |
What's the cardinality?
├── One-to-One → hasOne / belongsTo
├── One-to-Many → hasMany / belongsTo
├── Many-to-Many → belongsToMany (pivot table)
├── Through another → hasOneThrough / hasManyThrough
└── Polymorphic?
├── One-to-One → morphOne / morphTo
├── One-to-Many → morphMany / morphTo
└── Many-to-Many → morphToMany / morphedByMany
What's the problem?
├── Too many queries → Eager loading (with)
├── Memory exhaustion → chunk() or cursor()
├── Slow queries → Add indexes, select columns
├── Repeated queries → Cache results
└── Large inserts → Batch operations
| Topic | Reference | When to Consult |
|---|---|---|
| Models | models.md | Model config, fillable, conventions |
| Basic Relations | relationships-basic.md | HasOne, HasMany, BelongsTo |
| Many-to-Many | relationships-many-to-many.md | Pivot tables, attach/sync |
| Advanced Relations | relationships-advanced.md | Through, dynamic relations |
| Polymorphic | relationships-polymorphic.md | MorphTo, MorphMany |
| Eager Loading | eager-loading.md | N+1 prevention, with() |
| Scopes | scopes.md | Local, global, dynamic |
| Casts | casts.md | Type casting, custom casts |
| Accessors/Mutators | accessors-mutators.md | Attribute transformation |
| Events/Observers | events-observers.md | Lifecycle hooks |
| Soft Deletes | soft-deletes.md | Recoverable deletion |
| Collections | collections.md | Eloquent collection methods |
| Serialization | serialization.md | toArray, toJson, hidden |
| Factories | factories.md | Test data generation |
| Performance | performance.md | Optimization techniques |
| API Resources | resources.md | JSON transformation |
| Transactions | transactions.md | Atomic operations, rollback |
| Pagination | pagination.md | paginate, cursor, simplePaginate |
| Aggregates | aggregates.md | count, sum, withCount, exists |
| Batch Operations | batch-operations.md | insert, upsert, mass update |
| Query Debugging | query-debugging.md | toSql, dd, DB::listen |
| Template | When to Use |
|---|---|
| ModelBasic.php.md | Standard model with scopes |
| ModelRelationships.php.md | All relationship types |
| ModelCasts.php.md | Casts and accessors |
| Observer.php.md | Complete observer |
| Factory.php.md | Factory with states |
| Resource.php.md | API resource |
| EagerLoadingExamples.php.md | N+1 prevention |
class Post extends Model
{
protected $fillable = ['title', 'content', 'author_id'];
protected function casts(): array
{
return [
'published_at' => 'datetime',
'metadata' => 'array',
];
}
public function author(): BelongsTo
{
return $this->belongsTo(User::class);
}
}
// ✅ Good - 2 queries
$posts = Post::with('author')->get();
// ❌ Bad - N+1 queries
$posts = Post::all();
foreach ($posts as $post) {
echo $post->author->name;
}
#[Scope]
protected function published(Builder $query): void
{
$query->whereNotNull('published_at');
}
// Usage: Post::published()->get();
$fillable for mass assignment protectionwith()$guarded = [] in productionwith() columnsStructured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs