/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $post = $this->cat_gestion->getById($id); //$this->authorize('change', $post); $this->cat_gestion->destroy($post); return redirect('cat')->with('ok', trans('back/cat.destroyed')); }
/** * Redirect to categories with default category. * * @param $id * @return \Illuminate\Http\RedirectResponse */ public function showCategory($id) { $category = $this->category->getById($id); return redirect('/categories')->with('default', $category); }