MailFormBuilderEntry::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace MedianetDev\BackpackForm\Mail;
4
5
use Illuminate\Mail\Mailable;
6
7
class MailFormBuilderEntry extends Mailable
8
{
9
    /**
10
     * The order instance.
11
     */
12
    public $dataMail;
13
    public $view;
14
    /**
15
     * Create a new message instance.
16
     *
17
     * @param  $data
18
     * @return void
19
     */
20
    public function __construct(string $view, array $data)
21
    {
22
        $this->dataMail = $data;
23
        $this->view = $view;
24
    }
25
    /**
26
     * Build the message.
27
     *
28
     * @return $this
29
     */
30
    public function build()
31
    {
32
        return $this->from(config('backpack-form.email.from'))
33
                    ->view($this->view);
34
    }
35
}
36