| Package Data | |
|---|---|
| Maintainer Username: | jaygaha |
| Maintainer Contact: | jaygaha@gmail.com (Jay Gaha) |
| Package Create Date: | 2025-10-17 |
| Package Last Update: | 2025-10-17 |
| Home Page: | https://packagist.org/packages/jaygaha/lumen-form-request |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-16 03:00:05 |
| Package Statistics | |
|---|---|
| Total Downloads: | 5 |
| Monthly Downloads: | 4 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Bring Laravel-style Form Request validation to Lumen! This package provides full Form Request functionality including validation, authorization, and the make:request-form artisan command for Lumen 11.
Form request is a package for Lumen that lets developer validate form requests like Laravel does.
Purposes to create a form request class that existing Lumen
form-requestpackages do not support.
This package brings Laravel's FormRequest functionality to Lumen applications. While Lumen is designed to be a micro-framework, it often lacks some of the convenience features that Laravel provides. This package fills that gap by providing a complete FormRequest implementation that works seamlessly with Lumen 11.
make:request-form artisan commandYou can install the package via composer:
composer require jaygaha/lumen-form-request
Add the service provider to the bootstrap/app.php file:
$app->register(JayGaha\LumenFormRequest\Providers\FormRequestServiceProvider::class);
That's it! You're ready to use Form Requests in your Lumen application.
Make sure validation is enabled in your Lumen application. Add this to your bootstrap/app.php:
$app->withFacades();
$app->withEloquent();
You can generate a new Form Request class using the make:request-form artisan command:
php artisan make:request-form CreateUserFormRequest
This will create a new Form Request class in the app/Http/Requests directory.
<?php
declare(strict_types=1);
namespace App\Http\Requests;
use JayGaha\LumenFormRequest\Requests\FormRequest;
class CreateUserFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
//
];
}
}
If you find this package useful, please consider:
Contributions are welcome! Please open an issue or submit a pull request.
The MIT License (MIT). Please see License File for more information.