<?php
namespace App\Cells;

use App\Models\common\MenuModel;
class MenuCell
{
    public function index()
    {
        $model = new MenuModel();
        $menus = $model->getMenuList(session('usr_level'));

        $menuIcons = [
            'M1' => 'pe-7s-note2',
            'M2' => 'pe-7s-monitor',
            'M3' => 'pe-7s-mail',
            'M4' => 'pe-7s-display2',
            'M5' => 'pe-7s-config',
            'M6' => '',
            'M7' => 'pe-7s-monitor',
            'M8' => 'pe-7s-server',
            'M9' => 'pe-7s-graph2',
        ];

        return view('layouts/sidebar', [
            'mMenu' => $menus["mainMenu"],
            'sMenu' => $menus["subMenu"],
            'icons' => $menuIcons,
        ]);
    }
}