Files
backend/app/Http/Requests/V3/RoadObservation/VerifyBySupervisorRequest.php

31 lines
750 B
PHP

<?php
namespace App\Http\Requests\V3\RoadObservation;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class VerifyBySupervisorRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
* @return bool
*/
public function authorize(): bool
{
return Gate::allows('gate-supervise-road-observed',$this->roadObserved);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{return [
'verify' => ['required', 'in:1,2'],
'description' => ['string'],
];
}
}