fix form request

This commit is contained in:
2025-05-27 15:41:48 +03:30
parent 3e01f4e3b9
commit 151d7ed566
2 changed files with 4 additions and 5 deletions

View File

@@ -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;
}
/**

View File

@@ -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;
}
/**