From superpowers-laravel
Implements Laravel Form Requests to handle validation and authorization with rule objects, custom messages, nested data, and testing to keep controllers slim.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-laravel:form-requests-and-validationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Promote validation and authorization to dedicated Form Request classes. Keep controllers focused on orchestration and domain intents.
Promote validation and authorization to dedicated Form Request classes. Keep controllers focused on orchestration and domain intents.
# Create a request
sail artisan make:request UpdateProfileRequest # or: php artisan make:request UpdateProfileRequest
# Use in controller method signature
public function update(UpdateProfileRequest $request) {
$data = $request->validated();
// ...
}
authorize() to gate access; prefer Policies for complex checksRule::unique('users', 'email')->ignore($user->id)items.*.sku, addresses.home.citynullable + specific rules instead of sometimes for optional fieldsattributes() and messages()Rule classes or traits$request->safe()->only([...]) when partial updates are intendednpx claudepluginhub jpcaparas/superpowers-laravel --plugin superpowers-laravelProvides Laravel validation patterns using Form Requests, custom rules, conditional validation, and input sanitization. Useful for form handling and data validation in Laravel apps.
Reduces Laravel controller bloat by moving auth/validation to Form Requests, extracting logic to Actions/Services with DTOs, and using resource/single-action controllers. Useful for refactoring bloated controllers.
Provides production-grade Laravel architecture patterns for scalable apps: controllers, services, Eloquent, queues, events, caching, and API resources.