<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Home extends CI_Controller {
	public function __construct() {
		parent::__construct();
		cek_login();
	}
	
	public function index() {
		$conf = [
			'title' 		  => 'Dashboard',
			'total_brg'       => $this -> app -> total_brg_toko(),
			'total_masuk' 	  => $this -> app -> total_brg_masuk('today'),
			'total_jual' 	  => $this -> app -> total_brg_terjual('today'),
			'total_pemasukan' => $this -> app -> total_pemasukan_today(),
		];
		
		$this -> layout -> load('layout', 'home', $conf);
	}
}

// Controller Home
// Kode ini dibuat dan dikembangkan oleh codelingker