whereIn('id', $watchers->getWatcherUserIds())->get(); // TODO - Clean this up, likely abstract to base class // TODO - Prevent sending to current user $permissions = app()->make(PermissionApplicator::class); foreach ($users as $user) { if ($user->can('receive-notifications') && $permissions->checkOwnableUserAccess($detail, 'view')) { $user->notify(new PageCreationNotification($detail, $user)); } } } }