link = $data['link']; $menu ->mtitle = $data['title']; $menu ->url = $data['url']; $menu ->save(); Session::flash('sm' , 'Menu Has been saved'); } static public function find_item($id){ $sql = 'SELECT * FROM menus m WHERE m.id = ?'; $item = DB::select($sql,[$id] ); return $item; } static public function update_item($data,$id){ $menu = self::find($id); $menu ->link = $data['link']; $menu ->mtitle = $data['title']; $menu ->url = $data['url']; $menu ->save(); Session::flash('sm' , 'Menu Has been Updated!'); } }