From e9c3cd8c82da41d18d452793305e81cefdd8ffa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 7 Sep 2020 11:25:34 +0300 Subject: [PATCH] fixed signed routes --- app/Http/Requests/Portal/InvoiceShow.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Requests/Portal/InvoiceShow.php b/app/Http/Requests/Portal/InvoiceShow.php index 063821d83..73c528181 100644 --- a/app/Http/Requests/Portal/InvoiceShow.php +++ b/app/Http/Requests/Portal/InvoiceShow.php @@ -13,6 +13,10 @@ class InvoiceShow extends FormRequest */ public function authorize() { + if (auth()->guest()) { + return true; + } + return $this->invoice->contact_id == user()->contact->id; }