mawuekom / laravel-form-request
Laravel Form Request adaptation for Lumen Framework
v1.1.0
2022-04-21 14:11 UTC
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
README
This package is a Laravel Form Request adaptation for Lumen Framework. You can use it in Laravel also but, it's not necessary.
Installation
You can install the package via composer:
composer require mawuekom/laravel-form-request
Make some configs
- Add the service provider in
bootstrap/app.php
$app->register(Mawuekom\FormRequest\FormRequestServiceProvider::class);
Next step is create your FormRequest and extends from Mawuekom/FormRequest/Http/FormRequest
Usage
<?php namespace App\Http\Requests; use Mawuekom\FormRequest\Http\FormRequest; class StoreUserRequest extends FormRequest { public function authorize() { return true; } public function rules() { return [ 'name' => 'required|string', 'email' => 'required|string|email', ]; } }
License
The MIT License (MIT). Please see License File for more information.