Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
DeleteAccount
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 via
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 toMail
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Notifications\User;
4
5use Illuminate\Notifications\Messages\MailMessage;
6use Illuminate\Notifications\Notification;
7use Illuminate\Support\Facades\Lang;
8
9class DeleteAccount extends Notification
10{
11    public string $frontendBaseUrl;
12
13    public function __construct()
14    {
15        $this->frontendBaseUrl = config('romeo.frontend-base-url');
16    }
17
18    public function via($notifiable): array
19    {
20        return ['mail'];
21    }
22
23    public function toMail($notifiable): MailMessage
24    {
25        return (new MailMessage)
26            ->bcc(config('hubspotconfig.bcc_email'))
27            ->subject(Lang::get('Getting ready to clip your wings?'))
28            ->view('mail.user.delete', [
29                'name' => $notifiable->first_name,
30            ]);
31    }
32}