sanchescom / lumen-form-request
Lumen Form Request.
Installs: 2 134
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ~5.6|~7.0
- laravel/lumen-framework: ~5.8
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0||~6.0
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-26 22:47:24 UTC
README
Laravel Form Request for Lumen framework
Installing
Require this package, with Composer, in the root directory of your project.
composer require sanchescom/lumen-form-request
After updating composer add the following lines to register provider in bootstrap/app.php
$app->register(Sanchescom\Foundation\Providers\FormRequestServiceProvider::class);
Usage
<?php namespace App\Http\Requests; use Sanchescom\Foundation\Http\FormRequest; class StoreRequest extends FormRequest { public function authorize() { return true; } public function rules() { return [ 'name' => 'required|max:255', 'last_name' => 'required|max:255', 'email' => 'required|unique:users|email|max:100', 'password' => 'required|max:45', ]; } }