diff --git a/app/Http/Middleware/AssetCountForSidebar.php b/app/Http/Middleware/AssetCountForSidebar.php index 2bc3f950f9..e529f75efa 100644 --- a/app/Http/Middleware/AssetCountForSidebar.php +++ b/app/Http/Middleware/AssetCountForSidebar.php @@ -18,6 +18,14 @@ class AssetCountForSidebar */ public function handle($request, Closure $next) { + /** + * This needs to be set for the /setup process, since the tables might not exist yet + */ + $total_due_for_checkin = 0; + $total_overdue_for_checkin = 0; + $total_due_for_audit = 0; + $total_overdue_for_audit = 0; + try { $total_rtd_sidebar = Asset::RTD()->count(); view()->share('total_rtd_sidebar', $total_rtd_sidebar);