public function handle() { $emailEvent = EmailEvent::whereCode($this->code)->first(); if (is_null($emailEvent)) { throw new EmailEventException(trans('email::core.messages.events.job_not_found', ['name' => $this->code])); } $emailEvent->send($this->options); }