public function getById($id)
{
$category = $this->model->find($id);
if (!is_null($category)) {
$category->hot++;
$category->update();
}
return $category;
}
/** * 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')); }