Package Data | |
---|---|
Maintainer Username: | karlroberts |
Package Create Date: | 2020-06-05 |
Package Last Update: | 2020-06-05 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-15 03:06:14 |
Package Statistics | |
---|---|
Total Downloads: | 7 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Laravel Form Request adaptation for Lumen framework
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!