Package Data | |
---|---|
Maintainer Username: | LucasRodriguesBR |
Package Create Date: | 2017-07-20 |
Package Last Update: | 2022-11-11 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-16 15:01:52 |
Package Statistics | |
---|---|
Total Downloads: | 288,129 |
Monthly Downloads: | 3,051 |
Daily Downloads: | 97 |
Total Stars: | 3 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 5 |
Laravel Form Request adaptation for Lumen framework
Lumen 5.5
composer require urameshibr/lumen-form-request:1.4
Lumen 5.6 +
composer require urameshibr/lumen-form-request
$app->register(Urameshibr\Providers\FormRequestServiceProvider::class);
Next step is create your FormRequest and extends from Urameshibr/Requests/FormRequest
<?php
namespace App\Http\Requests;
use Urameshibr\Requests\FormRequest;
class StoreDeviceRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'mac_address' => 'required|unique:devices,mac_address'
];
}
}
https://laravel.com/docs/5.4/validation#available-validation-rules
Enjoy!