* * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ public function via(object $notifiable): array { // phpcs:enable return ['mail']; } /** * Get the mail representation of the notification. */ public function toMail(object $notifiable): Mailable { /** @var Settings */ $settings = resolve(Settings::class); /** @var Customer $notifiable */ return new DiscountWonMail( new Address( $notifiable->email, $this->first_name ), $settings->name, $this->discount, route('fo.view-winning-participations'), $settings->company, ); } }