public function updateEventsTable() { $events = EventModel::all(); foreach ($events as $event) { $count = Subscription::findEventCount($event->id); EventModel::fixEventCounts($event->id, $count); } }