PHPackages                             mayoz/lumen-form-request - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mayoz/lumen-form-request

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

mayoz/lumen-form-request
========================

Adopt the Laravel Form Request to Lumen framework.

v2.0.0(5y ago)22.5kMITPHPPHP ^7.3|^8.0CI failing

Since Apr 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mayoz/lumen-form-request)[ Packagist](https://packagist.org/packages/mayoz/lumen-form-request)[ Docs](https://github.com/mayoz/lumen-form-request)[ RSS](/packages/mayoz-lumen-form-request/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

Lumen Form Request
==================

[](#lumen-form-request)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5548ff6b143e1e0728158a452ed51d5cadab8ed22c04b540dedb9015eb1395b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61796f7a2f6c756d656e2d666f726d2d726571756573742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mayoz/lumen-form-request)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/783e81779a1d3bd53b9c12e761094ae3f35868ca7bdfc6c992e02868be776d76/68747470733a2f2f7374796c6563692e696f2f7265706f732f3235393539333336312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/259593361)

Adopt the Laravel Form Request to Lumen framework.

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mayoz/lumen-form-request
```

Register the service provider in your `boostrap/app.php` configuration file:

```
$app->register(Illuminate\Foundation\Providers\FormRequestServiceProvider::class);
```

Usage
-----

[](#usage)

Let's continue the official [Laravel's documantation](https://laravel.com/docs/7.x/validation).

Format Validation
-----------------

[](#format-validation)

If you want to format the verification messages, follow these steps:

Firstly import the `ValidationException` class:

```
use Illuminate\Validation\ValidationException;
```

Add (if need) the `dontReport` list:

```
/**
 * A list of the exception types that should not be reported.
 *
 * @var array
 */
protected $dontReport = [
    // ...
    ValidationException::class,
];
```

And finally update the `render` method:

```
/**
 * Render an exception into an HTTP response.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  \Throwable  $exception
 * @return \Symfony\Component\HttpFoundation\Response
 *
 * @throws \Throwable
 */
public function render($request, Throwable $exception)
{
    if ($exception instanceof ValidationException) {
        return $this->convertValidationExceptionToResponse($exception, $request);
    }

    return parent::render($request, $exception);
}

/**
 * Create a response object from the given validation exception.
 *
 * @param  \Illuminate\Validation\ValidationException  $e
 * @param  \Illuminate\Http\Request  $request
 * @return \Symfony\Component\HttpFoundation\Response
 */
protected function convertValidationExceptionToResponse(ValidationException $e, $request)
{
    if ($e->response) {
        return $e->response;
    }

    return response()->json([
        'message' => $e->getMessage(),
        'errors' => $e->errors(),
    ], $e->status);
}
```

License
-------

[](#license)

This package is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~237 days

Total

2

Last Release

1973d ago

Major Versions

v1.0.0 → v2.0.02020-12-22

PHP version history (2 changes)v1.0.0PHP ^7.3

v2.0.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8ee9725869df3b8aee7a15e9dc2361b567306d2d02a03f09ce47f7bb1ccda69?d=identicon)[mayoz](/maintainers/mayoz)

---

Top Contributors

[![mayoz](https://avatars.githubusercontent.com/u/61626?v=4)](https://github.com/mayoz "mayoz (4 commits)")

---

Tags

form-requestlumen-frameworkvalidationrequestlumenvalidate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mayoz-lumen-form-request/health.svg)

```
[![Health](https://phpackages.com/badges/mayoz-lumen-form-request/health.svg)](https://phpackages.com/packages/mayoz-lumen-form-request)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

71510.9M66](/packages/laravel-mcp)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
