public function indexAction()
 {
     if ($this->request->isPost()) {
         $mname = $this->request->getPost('name');
         $mprice = $this->request->getPost('price');
         $mtype = $this->request->getPost('type');
         $mstype = $this->request->getPost('stype');
         $category = $this->request->getPost('category');
         $menu = new Menudetails();
         $menu->m_name = $mname;
         $menu->m_price = $mprice;
         $menu->m_type = $mtype;
         $menu->m_subtype = $mstype;
         $menu->m_category = $category;
         if ($menu->save() == false) {
             foreach ($menu->getMessages() as $message) {
                 echo $message;
             }
         }
         return $this->response->redirect('menu');
     }
     $vegmenudetails = Menudetails::find(array("m_category = 'Veg'", "order" => "m_type,m_subtype"));
     $this->view->vegmenu = $vegmenudetails;
     $nvegmenudetails = Menudetails::find(array("m_category = 'NonVeg'", "order" => "m_type,m_subtype"));
     $this->view->nvegmenu = $nvegmenudetails;
 }
 public function indexAction()
 {
     $vegmenudetails = Menudetails::find(array("m_category = 'Veg'", "order" => "m_type,m_subtype"));
     $this->view->vegmenu = $vegmenudetails;
     $nvegmenudetails = Menudetails::find(array("m_category = 'NonVeg'", "order" => "m_type,m_subtype"));
     $this->view->nvegmenu = $nvegmenudetails;
 }