<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Dashboard_model extends CI_Model
{

    function __construct()
    {
        parent::__construct();
    }   

    function getMenu(){
        $countMenu = $this->db->select('count(*) as count')->from('menu')->get();
        return $countMenu->result_array()[0];
    }

    function getCate(){
        $countMenu = $this->db->select('count(*) as count')->from('category')->get();
        return $countMenu->result_array()[0];
    }

    function getHotelCate(){
        $countMenu = $this->db->select('count(*) as count')->from('hotel_category')->get();
        return $countMenu->result_array()[0];
    }

    
    function getFacilities(){
        $countFacilities = $this->db->select('count(*) as count')->from('facilities')->get();
        return $countFacilities->result_array()[0];
    }

    function gethotels(){
        $completeHotels = $this->db->select('count(*) as count')->from('hotels')->get();
        return $completeHotels->result_array()[0];
    }

    // function getHotelFacilities($menu_id,$hotel_id){
    //     $countHotelFacilities = $this->db->select('count(*) as count')->where('fiMenuId',$menu_id)->where('fiHotelsId',$hotel_id)->from('hotel_facilitates')->get();
    //     return $countHotelFacilities->result_array()[0];
    // }



}
