toArray(); return view('cms.categories' , self::$data); } public function create() { return view('forms.addCategory' , self::$data); } public function store(CategoryRequest $request) { Categorie::save_new($request); return redirect('cms/categories'); } public function show($id) { self::$data['item'] = Categorie::find_item($id); return view('cms.delete-categories' , self::$data); } public function edit($id) { self::$data['categories'] = Categorie::find_item($id); return view('cms.cms-edit-categories' , self::$data); } public function update(CategoryRequest $request, $id) { Categorie::update_item($request,$id); return redirect('cms/categories'); } public function destroy($id) { Categorie::destroy($id); Session::flash('sm' , 'Categorie Deleted'); return redirect('cms/categories'); } }