diff --git a/app/Http/Requests/UpdatePirepRequest.php b/app/Http/Requests/UpdatePirepRequest.php index fa0cf0e2..3044185b 100644 --- a/app/Http/Requests/UpdatePirepRequest.php +++ b/app/Http/Requests/UpdatePirepRequest.php @@ -15,7 +15,7 @@ class UpdatePirepRequest extends FormRequest */ public function authorize(): bool { - $pirep = Pirep::findOrFail($this->route('id'), ['user_id']); + $pirep = Pirep::findOrFail($this->route('pirep'), ['user_id']); return $pirep->user_id === Auth::id(); }