Files
backend/app/Http/Requests/V3/AccidentReceipt/ChangeStatusRequest.php

31 lines
698 B
PHP

<?php
namespace App\Http\Requests\V3\AccidentReceipt;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class ChangeStatusRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Auth::user()->hasPermissionTo('change-accident-status');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'status_id' => 'required',
];
}
}