123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Http\Controllers;
- class DashboardController extends Controller
- {
- public function index() {
- // dd($this->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");
- }
- }
|