ContactFormSubmitted::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 9.4285
1
<?php
2
3
namespace App\Mail;
4
5
use App\Models\FormResponse;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
11
class ContactFormSubmitted extends Mailable implements ShouldQueue
12
{
13
    use Queueable, SerializesModels;
14
15
    /** @var \App\Models\FormResponse */
16
    public $formResponse;
17
18
    /**
19
     * Create a new message instance.
20
     *
21
     * @param \App\Models\FormResponse $formResponse
22
     */
23
    public function __construct(FormResponse $formResponse)
24
    {
25
        $this->formResponse = $formResponse;
26
    }
27
28
    /**
29
     * Build the message.
30
     *
31
     * @return $this
32
     */
33
    public function build()
34
    {
35
        return $this
36
            ->to(config('mail.recipients.questionForm'))
37
            ->subject('Een nieuwe reactie op '.config('app.url'))
38
            ->view('mails.admin.contactFormSubmitted');
39
    }
40
}
41