| Package Data | |
|---|---|
| Maintainer Username: | carbontwelve |
| Maintainer Contact: | simon.dann@gmail.com (Simon Dann) |
| Package Create Date: | 2019-08-25 |
| Package Last Update: | 2025-01-08 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-12-03 15:20:14 |
| Package Statistics | |
|---|---|
| Total Downloads: | 8 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 1 |
While working on an api utilising the Lumen framework I found myself missing the FormRequest functionality that comes out of the box with Laravel.
A quick Google search discovered this article by Mikiyas Amdu.
The code in the article is a little out of date and while I was updating it for use in one of my projects I decided to break out the code into this small library so I could use it in my other Lumen projects.
Mikiyas original code dealt with redirects and sessions; in order to keep this implementation in line with how Lumen is intended to be used I have stripped out that functionality and coded for returning Json responses.
Install with composer require photogabble/lumen-form-request and then enable the library in your bootstrap/app.php file with:
$app->register(\Photogabble\LumenFormRequest\LumenFormGeneratorServiceProvider::class);
Create a new form request with the command make:api-request {request name} and the command will create a new file in your app/Http/Requests path (creating it if it does not already exist).
A little further digging and I discovered that Mikiyas had already wrapped their implementation into the urameshibr/lumen-form-request library.