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


class Menu_model extends CI_Model
{
    public function get_all_menu($date)
    {
        $this->db->where('date_created', $date);
        $this->db->join('produk', 'produk.id_produk=menu_harian.id_produk',);
        return $this->db->get('menu_harian');
    }

    public function add_menu($params)
    {
        return $this->db->insert('menu_harian', $params);
    }

    public function delete_menu($id_produk)
    {
        $this->db->where('id_menu', $id_produk);
        return $this->db->delete('menu_harian');
    }
}
?>