getMenu()); // dump(session('user.SortMenu')); // dump(session('GateToken')); // $erpThemes = preg_replace('/\s+/', '', explode(',', env('ERP_THEMES'))); // // if ($erpThemes[0]) { // return view("erp.{$erpThemes[0]}.resources.views.dashboard"); // } $sortMenu = session('user.SortMenu'); if (empty($sortMenu['C7'])) { return view('pages.generic_dash'); } $component = explode('::', $sortMenu['C7']); if (count($component) === 1) { return view('pages.' . $sortMenu['C7']); } return redirect()->route("themes.$component[0].dashboard"); } }