function postDomainDeleteModal(ServerDomain $domain) { /* Check that the domain belongs to the groups server */ if (Auth::user()->student->group->id != $domain->server->group->id) { return; } /* Students cannot change when the domain is locked */ if ($domain->locked) { return; } $domain->delete(); }