Skip to content

Laravel API Builder

Flagged

Builds Laravel REST APIs with Eloquent models, Form Requests, API Resources, and Sanctum or Passport authentication.

By Community 5,200 stars v1.1.0 Updated 2026-03-10
$ 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

Related Skills

FAQ

What does Laravel API Builder do?
Builds Laravel REST APIs with Eloquent models, Form Requests, API Resources, and Sanctum or Passport authentication.
What platforms support Laravel API Builder?
Laravel API Builder is available on Claude Code, Cursor, Windsurf.
What are the use cases for Laravel API Builder?
Building Laravel REST APIs for mobile and SPA frontends. Implementing token-based authentication with Laravel Sanctum. Generating Eloquent models with relationships and scopes.
What tools work with Laravel API Builder?
Laravel API Builder works well with Claude Code, Cursor, GitHub Copilot.

100+ free AI tools

Writing, PDF, image, and developer tools — all in your browser.

Next Step

Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.