laravel-specialist

Build Laravel 10+ applications with Eloquent models, queues, APIs, and Livewire components.

Updated Sep 5, 2025
One-click install
npx skills add https://github.com/baubyte/website --skill laravel-specialist-baubyte
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel-specialist
Source: https://github.com/baubyte/website/tree/main/.ai/skills/laravel-specialist
Command: npx skills add https://github.com/baubyte/website --skill laravel-specialist-baubyte

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building Laravel applications correctly requires deep knowledge of Eloquent relationships, queue configuration, API resource design, and testing patterns, and mistakes like N+1 queries or missing validation cause production issues. ## Core Features & Use Cases - Eloquent Model Design: Create models with relationships, scopes, custom casts, and query optimization patterns that prevent N+1 problems. - Queue & Job Management: Implement queued jobs with retry logic, batching, chaining, rate limiting, and Horizon monitoring. - API Development: Build RESTful APIs with controllers, form request validation, API resources, and Sanctum authentication. - Use Case: You need to add a posts API to a Laravel app. The Skill generates the migration, model with relationships, API resource, controller with form request validation, queued publish job, and Pest feature tests, then verifies each step with artisan commands. ## Quick Start Ask the assistant to create a Laravel Eloquent model with relationships, an API resource, and a queued job for a posts feature, then run the Pest tests.

Frequently Asked Questions about laravel-specialist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Eloquent model with relationships in Laravel?▼

Define relationship methods like hasMany, belongsTo, and belongsToMany on the model, then eager load them with ::with() at the call site to avoid N+1 queries. Use php artisan make:model with the -m flag to generate the migration alongside the model.

How to queue long-running tasks in Laravel with Horizon?▼

Create a job class implementing ShouldQueue with the Dispatchable, InteractsWithQueue, Queueable, and SerializesModels traits, then dispatch it with Job::dispatch(). Configure Horizon supervisors in config/horizon.php and run php artisan horizon to monitor Redis queues.

Does Laravel Sanctum support token abilities for API authentication?▼

Yes, Sanctum supports token abilities that restrict what actions a token can perform. In tests, use Sanctum::actingAs($user, ['ability']) to simulate authenticated requests with specific permissions and verify 403 responses for unauthorized abilities.

Why do I get N+1 query problems in Laravel and how do I fix them?▼

N+1 problems occur when accessing relationships in a loop without eager loading, causing one query per record. Fix them by eager loading with Post::with(['user', 'comments']) or using withCount() for relationship counts.

What is the difference between Pest and PHPUnit for Laravel testing?▼

Pest is a testing framework built on PHPUnit with a functional, expectation-based syntax using it() and test() functions instead of class methods. Both run via php artisan test and support the same Laravel testing helpers like RefreshDatabase and factories.