More view sharing for sidebar

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-04-26 19:01:15 +01:00
parent d40604b574
commit 2117f61e8c

View file

@ -88,6 +88,20 @@ class AssetCountForSidebar
\Log::debug($e); \Log::debug($e);
} }
try {
$total_due_for_checkin = Asset::DueForCheckin($settings)->count();
view()->share('total_due_for_checkin', $total_due_for_checkin);
} catch (\Exception $e) {
\Log::debug($e);
}
try {
$total_overdue_for_checkin = Asset::OverdueForCheckin($settings)->count();
view()->share('total_overdue_for_checkin', $total_overdue_for_checkin);
} catch (\Exception $e) {
\Log::debug($e);
}
return $next($request); return $next($request);
} }
} }