toArray(); // dd(self::$data); return view('cms.content' , self::$data); } public function create() { return view('cms.cms-add-content' , self::$data); } public function store(ContentRequest $request) { Content::save_new($request); return redirect('cms/content'); } public function show($id) { self::$data['item'] = Content::findThis($id); return view('cms.delete-contnet' , self::$data); } public function edit($id) { self::$data['content'] = Content::findThis($id); return view('cms.edit_content' , self::$data); } public function update(ContentRequest $request, $id) { Content::update_item($request,$id); return redirect('cms/content'); } public function destroy($id) { Content::destroy($id); Session::flash('sm' , 'Content Deleted'); return redirect('cms/content'); } }