<?php

namespace App\Controllers\Mobile\Utils;

use App\Controllers\Mobile\BC;
use App\Models\Mobile\Utils\SidebarModel;
use CodeIgniter\API\ResponseTrait;

class Sidebar extends BC
{
    use ResponseTrait;
    public function index()
    {
        if (!$this->request->isAJAX() && ENVIRONMENT != 'development') {
            exit('No direct script access allowed');
        }
        $SidebarModel = new SidebarModel();
        $sidebar['menu'] = $SidebarModel->menu();
        return $this->respond($sidebar);
    }
}
