laravel:form-requests

Move Laravel validation and authorization into dedicated Form Request classes.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-form-requests-sivanwol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:form-requests
Source: https://github.com/Sivanwol/sabo-platfom/tree/main/.agents/skills/laravel-form-requests
Command: npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-form-requests-sivanwol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Controllers become bloated when handling validation and authorization logic; Form Requests centralize these concerns, keeping controllers slim and focused on orchestration.

Core Features & Use Cases

  • Move validation and authorization into dedicated Form Request classes.
  • Use rule objects, custom messages, and nested data handling to validate complex payloads.
  • Reuse shared validation logic across controllers and actions.

Quick Start

Create a Form Request class and type-hint it in your controller to automatically validate requests.

Frequently Asked Questions about laravel:form-requests

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

FAQPage Schema
How do I move Laravel validation logic out of my controllers?

To move Laravel validation logic out of controllers, use Form Request classes. You define authorize() and rules() methods in dedicated classes, then type-hint the request in your controller methods to automatically validate input and keep controllers slim.

What is the best way to validate nested data in Laravel requests?

The best way to validate nested data in Laravel is using Form Requests. By defining nested array rules within the rules() method of a Form Request class, you can validate complex request payloads before the data ever reaches your controller methods.

How do I centralize authorization checks for Laravel CRUD endpoints?

Centralize Laravel authorization for CRUD endpoints by defining an authorize() method within a Form Request class. Type-hinting this request in controller actions ensures authorization logic runs automatically before validation and controller execution.

Does Laravel Form Request validation work for reusing rules across multiple controllers?

Yes, Laravel Form Request validation works for reusing rules across multiple controllers. By encapsulating validation and authorization logic within dedicated classes, you can share and type-hint the same Form Request across various controller actions.

How do I get only validated data from a Laravel Form Request?

To get only validated data from a Laravel Form Request, use the $request->validated() method. This returns a safe array of input that passed validation, allowing your controller to process only authorized and rule-compliant payload data.

When should I use Laravel Form Requests instead of inline controller validation?

Use Laravel Form Requests instead of inline controller validation when controllers become bloated with validation logic. Form Requests centralize validation and authorization for complex payloads, keeping controllers focused on orchestration rather than data validation.