diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 42bf472889..57a26166a1 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -33,6 +33,7 @@ class QueryLogging $queries = DB::getQueryLog(); $count = count($queries); Log::info($request->method() . ' - ' . $request->url() . ": $count queries"); + //Log::info($queries); } } diff --git a/app/Libraries/HistoryUtils.php b/app/Libraries/HistoryUtils.php index ac2577d3a0..ade383ff5e 100644 --- a/app/Libraries/HistoryUtils.php +++ b/app/Libraries/HistoryUtils.php @@ -33,7 +33,7 @@ class HistoryUtils ]; $activities = Activity::scope() - ->with('client.contacts', 'invoice') + ->with(['client.contacts', 'invoice']) ->whereIn('user_id', $userIds) ->whereIn('activity_type_id', $activityTypes) ->orderBy('id', 'asc') @@ -46,6 +46,7 @@ class HistoryUtils $entity = $activity->client; } else { $entity = $activity->invoice; + $entity->setRelation('client', $activity->client); } static::trackViewed($entity); diff --git a/app/Ninja/Repositories/DashboardRepository.php b/app/Ninja/Repositories/DashboardRepository.php index 47046ffc09..5da859f286 100644 --- a/app/Ninja/Repositories/DashboardRepository.php +++ b/app/Ninja/Repositories/DashboardRepository.php @@ -114,7 +114,7 @@ class DashboardRepository } return $activities->orderBy('activities.created_at', 'desc') - ->with('client.contacts', 'user', 'invoice', 'payment', 'credit', 'account') + ->with('client.contacts', 'user', 'invoice', 'payment', 'credit', 'account', 'task') ->take(50) ->get(); }