예제 #1
0
 public function otro()
 {
     $users = \Blog\Notice::orderBy('created_at', 'desc')->where('cate', 'Otros')->paginate(5);
     return view('filter.humor', compact('users'));
 }
예제 #2
0
 /**
  * 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();
 }
예제 #3
0
 /**
  * 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();
 }