/**
  * Remove the specified notificacione from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Notificacion::destroy($id);
     return Response::json(["status" => 'success'], 200);
 }
Example #2
0
 public function eliminarnotificacion($id)
 {
     if (Notificacion::find($id)->user_id == Auth::user()->id) {
         Notificacion::destroy($id);
         flashMessage("Notificacion Eliminada");
         return Redirect::back();
     } else {
         return "No posee los permisos para hacer esta operacion";
     }
 }