notification = $notification; } /** * Execute the job. * * @return void */ public function handle() { $account = $this->notification->account; $numberOfUsersInAccount = $account->users->count(); $this->notification->setNumberOfEmailsNeededForDeletion($numberOfUsersInAccount); foreach ($account->users as $user) { if ($user->shouldBeReminded($this->notification->trigger_date) && ! $account->hasLimitations()) { dispatch(new SendNotificationEmail($this->notification, $user)); } } } }