menu_id = $request['menu_id']; $content ->title =$request['title']; $content ->article = $request['article']; $content ->save(); Session::flash('sm' , 'Article Has been saved!'); } static public function findThis($id){ $sql = "SELECT * FROM contents c WHERE c.id = ?"; $content = DB::select($sql,[$id]); return $content; } static public function update_item($data,$id){ $content = self::find($id); $content ->menu_id = $data['menu_id']; $content ->title =$data['title']; $content ->article = $data['article']; $content ->save(); Session::flash('sm' , 'Content Has been Updated!'); } }