user(); $this->data['is_default'] = $user->is_default; // Assuming the user ID is available, if not, retrieve it from the session or authentication $user_id = auth()->id(); // Example: Fetching from authentication // Get the assigned menu for the user $assigned_menu = getAssignedMenu($user_id); $is_expand = false; if (str_contains($menuaction, 'REPORT')) { $is_expand = true; } ?>