From 2285bd8030aca3632ee8087d367cfb1e24e79ab8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 17 Dec 2021 10:10:12 +1100 Subject: [PATCH] Fixes for checking valid project --- app/Http/Middleware/QueryLogging.php | 6 +++--- .../ClientPortal/Statements/ShowStatementRequest.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 1eac23e7f310..7e4e7ff39096 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -54,10 +54,10 @@ class QueryLogging // info("Query count = {$count}"); - if($count > 175){ + // if($count > 175){ nlog("Query count = {$count}"); - nlog($queries); - } + // nlog($queries); + // } $ip = ''; diff --git a/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php b/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php index c205aac9095c..46827df6b6b3 100644 --- a/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php +++ b/app/Http/Requests/ClientPortal/Statements/ShowStatementRequest.php @@ -44,6 +44,7 @@ class ShowStatementRequest extends FormRequest public function client(): Client { - return auth('contact')->user()->client; + return Client::withTrashed()->without('contacts.company', 'documents', 'gateway_tokens')->where('id', auth('contact')->user()->client_id)->first(); + // return auth('contact')->user()->client; } }