Ejemplo n.º 1
0
 /**
  * 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'));
 }
Ejemplo n.º 2
0
 public function anyDestroy($id, Request $request)
 {
     $this->category_gestion->destroy($id);
     $request->session()->flash('alert-success', 'Category has been deleted successfully');
     return response(['status' => 'success']);
     exit;
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $this->categoryRepository->destroy($id);
     Flash::message('Category Deleted');
     return Redirect()->route('categories');
 }