utc(); $userFlights = UserFlight::where('departure_date', '<=', $now->toDateTimeString()) ->where(function ($query) { $query->whereNull('departure_processed_at') ->orWhereColumn('departure_processed_at', '<', 'departure_date'); }) ->get(); foreach ($userFlights as $flight) { $flight->update(['departure_processed_at' => $now]); new FollowerNotificationService()->notifyFlightEvent($flight, FlightNotificationType::Departed); } } }