Form request is a package for Lumen that lets developer validate form requests like Laravel does.

v2.3 2017-12-31 16:55 UTC

This package is auto-updated.

Last update: 2024-03-29 03:44:36 UTC


php-badge packagist-badge Total Downloads


A package that helps developer to segregate the validation logic from controller to a separate dedicated class. Lumen doesn't have any FormRequest class like Laravel. This will let you do that.


composer require albertcht/lumen-form-request
  • Add the service provider in bootstrap/app.php

Next step is create your FormRequest and extends from AlbertCht\Form\FormRequest



namespace App\Http\Requests;

use AlbertCht\Form\FormRequest;

class StoreDeviceRequest extends FormRequest
	public function authorize()
		return true;

	public function rules()
		return [
			'mac_address' => 'required|unique:devices,mac_address'