Issues (44)

app/Mail/DeclinedExchangeNotification.php (1 issue)

Severity
1
<?php
2
3
namespace App\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use App\Judite\Models\Exchange;
8
use Illuminate\Queue\SerializesModels;
9
10
class DeclinedExchangeNotification extends Mailable
11
{
12
    use Queueable, SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Mail\DeclinedExchangeNotification: $id, $class
Loading history...
13
14
    /**
15
     * The declined exchange.
16
     *
17
     * @var string
18
     */
19
    private $exchange;
20
21
    /**
22
     * Create a new message instance.
23
     *
24
     * @param \App\Judite\Models\Exchange $exchange
25
     */
26
    public function __construct(Exchange $exchange)
27
    {
28
        $this->exchange = $exchange;
29
    }
30
31
    /**
32
     * Build the message.
33
     *
34
     * @return $this
35
     */
36
    public function build()
37
    {
38
        $course = $this->exchange->course();
39
        $fromStudent = $this->exchange->fromStudent();
40
        $toStudent = $this->exchange->toStudent();
41
        $fromShift = $this->exchange->fromShift();
42
        $toShift = $this->exchange->toShift();
43
44
        return $this->markdown('emails.exchanges.declined',
45
            compact('course', 'fromStudent', 'toStudent', 'fromShift', 'toShift'));
46
    }
47
}
48