public function otro() { $users = \Blog\Notice::orderBy('created_at', 'desc')->where('cate', 'Otros')->paginate(5); return view('filter.humor', compact('users')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { \Blog\Notice::destroy($id); Session::flash('message', 'Post borrado correctamente'); return back()->withInput(); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id, Request $request) { \Blog\Comments::destroy($id); $notice = \Blog\Notice::find($id); $cantidad = $request->cantidad - 1; $notice->fill(['comment' => $cantidad]); $notice->save(); Session::flash('message', 'Comentario borrado correctamente'); return back()->withInput(); }