Package Data | |
---|---|
Maintainer Username: | Linhdanchu |
Package Create Date: | 2019-11-22 |
Package Last Update: | 2019-11-22 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:22:03 |
Package Statistics | |
---|---|
Total Downloads: | 77 |
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 linhdanchu/lumen-form-request:1.4
$app->register(Linhdanchu\Providers\FormRequestServiceProvider::class);
Next step is create your FormRequest and extends from linhdanchu/Requests/FormRequest
<?php
namespace App\Http\Requests;
use Linhdanchu\Requests\FormRequest;
class StoreDeviceRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'mac_address' => 'required|unique:devices,mac_address'
];
}
}