prize = $prize->withoutRelations(); } /** * Get the notification's delivery channels. * * @param object $notifiable * @return array * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ public function via(object $notifiable): array { // phpcs:enable return ['mail']; } /** * Get the mail representation of the notification. * * @param object $notifiable * @return \Illuminate\Contracts\Mail\Mailable */ public function toMail(object $notifiable): Mailable { /** @var \App\Models\Tenant $tenantModel */ $tenantModel = $this->prize->tenant; /** @var \App\Models\Settings */ $settings = $tenantModel->setting; /** @var \App\Models\Customer $notifiable */ return (new PrizeWonMail( new Address( $notifiable->email, $this->first_name ), $settings->name, $this->prize, config('app.url'), $settings->company, )); } }