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

31 lines
673 B
PHP

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