File: /mnt/data/ghayatcom/ghayatcom-api/app/Http/Requests/SetOnDemandRequest.php
<?php
namespace App\Http\Requests;
use App\Library\CustomFailedValidation;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
class SetOnDemandRequest extends CustomFailedValidation
{
/**
* 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 [
'is_online' => 'required|numeric',
'online_until' => 'required',
'user_id' => 'required',
];
}
}