You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
622 B

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateSeminarRequest extends FormRequest
{
public function rules()
{
return [
'name' => 'required|string',
'description' => 'nullable|string',
'applyable' => 'boolean',
'deposit' => 'numeric|min:0',
'start' => 'required|date|after:today',
'end' => 'required|date|after:today',
'place' => 'nullable|string',
];
}
public function authorize()
{
return \Auth::user()->role->hasRight('SEMINAR_WRITE');
}
}