diff --git a/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php b/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php index 63839c30..0bbed211 100644 --- a/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php +++ b/app/Http/Requests/V3/AccidentReceipt/ConfirmPaymentInfoRequest.php @@ -11,9 +11,9 @@ class ConfirmPaymentInfoRequest extends FormRequest /** * Determine if the user is authorized to make this request. */ - public function authorize(Accident $accident): bool + public function authorize(): bool { - return $accident->status === AccidentStates::SODOR_NAME_BIME_VA_DAGHI->value; + return $this->accident->status === AccidentStates::SODOR_NAME_BIME_VA_DAGHI->value; } /** diff --git a/app/Http/Requests/V3/AccidentReceipt/UpdateRequest.php b/app/Http/Requests/V3/AccidentReceipt/UpdateRequest.php index bdf9908c..c73a9bc8 100644 --- a/app/Http/Requests/V3/AccidentReceipt/UpdateRequest.php +++ b/app/Http/Requests/V3/AccidentReceipt/UpdateRequest.php @@ -3,7 +3,6 @@ namespace App\Http\Requests\V3\AccidentReceipt; use App\Enums\AccidentStates; -use App\Models\Accident; use Illuminate\Foundation\Http\FormRequest; class UpdateRequest extends FormRequest @@ -11,9 +10,9 @@ class UpdateRequest extends FormRequest /** * Determine if the user is authorized to make this request. */ - public function authorize(Accident $accident): bool + public function authorize(): bool { - return $accident->status === AccidentStates::BEDON_EGHDAM->value; + return $this->accident->status === AccidentStates::BEDON_EGHDAM->value; } /**