fix form request
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user