Package Data | |
---|---|
Maintainer Username: | sanchescom |
Maintainer Contact: | sanches.com@mail.ru (Aleksandr Efimov) |
Package Create Date: | 2019-07-11 |
Package Last Update: | 2019-08-26 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:23:33 |
Package Statistics | |
---|---|
Total Downloads: | 2,134 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 1 |
Laravel Form Request for Lumen framework
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);
<?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',
];
}
}