laravel

Provide Laravel 12.x development support for APIs, Eloquent, and migrations.

40|7|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel
Source: https://github.com/rawveg/skillsforge-marketplace/tree/main/laravel
Command: npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for Laravel 12.x development, covering routing, Eloquent, migrations, authentication, API design, and modern PHP patterns.

Core Features & Use Cases

  • Routing and controllers: Create robust web and API routes with clean structure.
  • Eloquent modeling: Build relationships and efficient queries.
  • API development: Implement authentication, validation, and clean APIs.

Quick Start

Scaffold a simple API route and controller, then define a basic Eloquent model with a migration.

Frequently Asked Questions about laravel

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

FAQPage Schema
How do I build a RESTful API with Laravel?

Build RESTful APIs in Laravel using routing to define endpoints, controllers to handle requests, Eloquent models for database interactions, and Sanctum or Passport for API token authentication. Laravel's routing system, validation middleware, and JSON response helpers enable clean, standards-compliant API development.

What's the best way to structure database migrations in Laravel?

Migrations in Laravel define schema changes as PHP classes with up() and down() methods. Use migrations to create tables, add columns, and manage relationships. Run migrations sequentially with `php artisan migrate` to keep your database schema version-controlled and reversible.

How do I define relationships between models using Eloquent?

Eloquent ORM lets you define relationships (one-to-many, many-to-many, has-many-through) as methods on your models. Relationships enable you to query associated data efficiently, load related records, and maintain referential integrity without manual SQL joins.

Can I use Laravel for both web applications and APIs?

Yes. Laravel handles web routing with controllers and views, and API routing with JSON responses and token authentication. The same framework supports traditional server-rendered pages and headless APIs, letting you build full-stack applications or separate backend services.

What authentication methods does Laravel provide for APIs?

Laravel provides Sanctum for SPA and mobile token authentication, and Passport for OAuth 2.0. Both issue API tokens for stateless authentication, support token expiration and scopes, and integrate with Laravel's built-in user model and guards.

How do I validate API requests in Laravel?

Define validation rules in controllers or dedicated FormRequest classes using Laravel's fluent rule builder. Validation runs automatically before reaching your controller action, returning structured error responses for invalid data.