35 lines
721 B
PHP
35 lines
721 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\Vihar;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class StoreViharRequest extends FormRequest
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Determine if the user is authorized to make this request.
|
||
|
|
*
|
||
|
|
* @return bool
|
||
|
|
*/
|
||
|
|
public function authorize()
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the validation rules that apply to the request.
|
||
|
|
*
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
public function rules()
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'sant_id' => 'exists:sants,id',
|
||
|
|
'from' => 'required',
|
||
|
|
'to' => 'required',
|
||
|
|
'start_date' => 'required|date_format:Y-m-d',
|
||
|
|
'start_time' => 'required|date_format:H:i'
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|