photogabble/lumen-form-request

Laravel-like form requests built for Lumen
12
Install
composer require photogabble/lumen-form-request
Latest Version:v1.0.1
PHP:>=7.3.4
License:MIT
Last Updated:Jan 8, 2025
Links: GitHub  ·  Packagist
Maintainer: carbontwelve

About

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

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);

Usage

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).

Not invented here

A little further digging and I discovered that Mikiyas had already wrapped their implementation into the urameshibr/lumen-form-request library.

License

MIT

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440