updated_at)) > (60 * 60)) { $history = History::where("info_hash", $peer->info_hash)->where("user_id", $peer->user_id)->first(); if ($history) { $history->active = false; $history->save(); } $peer->delete(); } } return redirect('staff_dashboard')->with(Toastr::success('Ghost Peers Have Been Flushed', 'Yay!', ['options'])); } }