customMail::__construct()   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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace App\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
9
class customMail extends Mailable
10
{
11
    use Queueable, SerializesModels;
12
13
    protected $body;
14
15
    public $subject;
16
17
    /**
18
     * Create a new message instance.
19
     *
20
     * @return void
21
     */
22
    public function __construct($subject, $body)
23
    {
24
        $this->subject = $subject;
25
        $this->body = $body;
26
    }
27
28
    /**
29
     * Build the message.
30
     *
31
     * @return $this
32
     */
33
    public function build()
34
    {
35
        $body = $this->body;
36
        $this->subject($this->subject);
37
        return $this->markdown('emails.customMail', compact("body"));
38
    }
39
}
40