<?php

namespace DefStudio\GameEngine\Listeners\Organizations;

use DefStudio\GameEngine\Events\Organizations\UserSubscribedToOrganization;

class UserSubscribedToOrganizationListener
{
    public function handle(UserSubscribedToOrganization $event): void
    {
        $event->user->unsetRelation('organizations');
        $event->organization->unsetRelation('users');
        $event->organization->unsetRelation('admins');
        $event->organization->unsetRelation('masters');
        $event->organization->unsetRelation('players');
    }
}
