add Event Catégory bien admin

This commit is contained in:
2020-07-19 13:03:32 +02:00
parent 1e7e1fc09e
commit 6a1c83dc59
6 changed files with 109 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EventCategoryRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->user()->isAdmin();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required',
'description' => 'nullable|string',
];
}
}