<?php namespace App\Controllers;
/**
 * File			: Dashboard.php
 * Description  : Controller untuk halaman utama
 * Created By	: Hendi
 * Created Date : 13 Mar 2021
 * Last Update  : 13 Apr 2021
**/
use \App\Models\AntrianModel;
class Dashboard extends MyBaseController
{
	public function index()
	{
	    (new AntrianModel)->hideAntrian();
		# fn isLoggedIn di MyBaseController
		//if (!$this->isLoggedIn()) return redirect()->to(base_url('/login'));
		# jika sudah menu dinamis diisi dari array hasil query
		$data_sidebar = []; 
		# jika dibutuhkan data untuk konten
		$data_content = [
			'mod' => 'dashboard',
		];
		$data = [
			'title' => 'Dashboard',
			'sidebar' => view('contents/sidebar', $data_sidebar),
			'content' => view('contents/dashboard', $data_content),
		];
		return view('templates/index', $data);
	}
}
