getServerSetupStatus)(); // Get latest logs $status['logs'] = getListOfLatestLogs(); // Add latest database backups $status['backups'] = collect(Storage::allFiles('app-backup')) ->map(fn ($path) => str_replace('app-backup/', '', $path)) ->reverse() ->values() ->take(5); // Add cron info $status['cron'] = [ 'running' => isRunningCron(), 'lastUpdate' => isRunningCron() ? format_date(cache()->get('latest_cron_update')) : null, 'command' => getCronCommandSuggestions(), ]; return response()->json($status); } }