Laravel API Builder
VerifiedBuilds Laravel REST APIs with Eloquent models, Form Requests, API Resources, and Sanctum or Passport authentication.
Install
Claude Code
Copy the SKILL.md file to your project's .claude/skills/ directory About This Skill
Laravel API Builder generates idiomatic Laravel REST APIs following Laravel's conventions and the "happy path" approach that makes the framework so productive. It covers the complete API development workflow.
Generated Components
Models and Migrations - Eloquent models with `$fillable`, `$casts`, and relationship methods - Database migrations with proper column types and indexes - Model factories for testing and seeding - Query scopes for common filtering patterns
Request Handling - **Form Requests** (`App\Http\Requests\`) with validation rules and authorization - Custom validation rules for business logic - Request data transformation before validation
API Resources - `JsonResource` and `ResourceCollection` classes for response shaping - Conditional attribute loading based on relationships loaded - Pagination meta integration
Routes and Controllers - RESTful resource controllers using `Route::apiResource()` - Nested resource routing for related models - Route model binding for automatic model resolution
Authentication - Laravel Sanctum SPA authentication - API token generation and management - Middleware groups for API protection
Testing - Feature tests using `RefreshDatabase` trait - HTTP assertion helpers (`assertJson`, `assertStatus`) - Test data factories chained with `->create()`
Use Cases
- Building Laravel REST APIs for mobile and SPA frontends
- Implementing token-based authentication with Laravel Sanctum
- Generating Eloquent models with relationships and scopes
- Creating API Resources for consistent JSON response transformation
Pros & Cons
Pros
- + Generates idiomatic Laravel code following official conventions
- + Sanctum authentication setup included and ready to use
- + Form Request validation keeps controllers clean
- + Model factories simplify test data setup
Cons
- - Generated code assumes Laravel 10+ — older versions may need adjustments
- - PHP ecosystem familiarity required to fully leverage generated patterns
Related AI Tools
Claude Code
Paid
Anthropic's agentic CLI for autonomous terminal-native coding workflows
- Terminal-native autonomous coding agent
- Full file system and shell access for multi-step tasks
- Deep codebase understanding via repository indexing
Cursor
Freemium
AI-native code editor with deep multi-model integration and agentic coding
- AI-native Cmd+K inline editing and generation
- Composer Agent for autonomous multi-file changes
- Full codebase indexing and context awareness
GitHub Copilot
Freemium
AI pair programmer that suggests code in real time across your IDE
- Real-time code completions across 30+ languages
- Copilot Chat for natural language code Q&A
- Pull request description and summary generation
Related Skills
Django API Builder
VerifiedBuilds Django REST Framework APIs with serializers, viewsets, authentication, and OpenAPI documentation.
Auth Middleware Builder
VerifiedGenerates authentication and authorization middleware for Node.js, Python, and Go APIs with JWT, API keys, and RBAC.
Stay Updated on Agent Skills
Get weekly curated skills + safety alerts
每周精选 Skills + 安全预警