api code global jain
This commit is contained in:
34
app/Http/Requests/Vihar/StoreViharRequest.php
Normal file
34
app/Http/Requests/Vihar/StoreViharRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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'
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user