SpotSubmitted::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
10
use App\Spot;
11
12
class SpotSubmitted extends Mailable
13
{
14
    use Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Mail\SpotSubmitted: $id, $class, $relations
Loading history...
15
    public $spotSubmitted;
16
17
    /**
18
     * Create a new message instance.
19
     *
20
     * @return void
21
     */
22
    public function __construct(Spot $spotSubmitted)
23
    {
24
        $this->spotSubmitted = $spotSubmitted;
25
    }
26
27
    /**
28
     * Build the message.
29
     *
30
     * @return $this
31
     */
32
    public function build()
33
    {
34
        return $this
35
            ->from('[email protected]', 'No Reply')
36
            ->subject('Nova submissão de Spot - benfica.live')
37
            ->markdown('emails.spot-submitted-admin');
38
    }
39
}
40