Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
BusinessProEnterpriseMail
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 4
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 envelope
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
6
 content
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 attachments
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Mail;
4
5use Illuminate\Bus\Queueable;
6use Illuminate\Contracts\Queue\ShouldQueue;
7use Illuminate\Mail\Mailable;
8use Illuminate\Mail\Mailables\Content;
9use Illuminate\Mail\Mailables\Envelope;
10use Illuminate\Queue\SerializesModels;
11
12class BusinessProEnterpriseMail extends Mailable
13{
14    use Queueable, SerializesModels;
15
16    /**
17     * Create a new message instance.
18     */
19    public function __construct(public string $action, public string $companyName, public string $adminEmail, public string $userEmail)
20    {
21        //
22    }
23
24    /**
25     * Get the message envelope.
26     */
27    public function envelope(): Envelope
28    {
29        $subject = $this->action === 'added' 
30            ? 'Take action: A new user has been added' 
31            : 'Take action: A user has been ' . $this->action;
32
33        return new Envelope(
34            subject: $subject,
35        );
36    }
37
38    /**
39     * Get the message content definition.
40     */
41    public function content(): Content
42    {
43        return new Content(
44            view: 'mail.admin.business_pro_notification',
45        );
46    }
47
48    /**
49     * Get the attachments for the message.
50     *
51     * @return array<int, \Illuminate\Mail\Mailables\Attachment>
52     */
53    public function attachments(): array
54    {
55        return [];
56    }
57}