Issues (44)

app/Mail/RegistrationConfirmation.php (3 issues)

1
<?php
2
3
namespace App\Mail;
4
5
use App\Judite\Models\User;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
10
class RegistrationConfirmation 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\RegistrationConfirmation: $id, $class
Loading history...
13
14
    /**
15
     * The user to be confirmed.
16
     *
17
     * @var string
18
     */
19
    public $user;
20
21
    /**
22
     * Create a new message instance.
23
     *
24
     * @param \App\Judite\Models\User $user
25
     */
26
    public function __construct(User $user)
27
    {
28
        $this->user = $user;
29
    }
30
31
    /**
32
     * Build the message.
33
     *
34
     * @return $this
35
     */
36
    public function build()
37
    {
38
        $name = $this->user->name;
0 ignored issues
show
The property name does not exist on string.
Loading history...
39
        $token = $this->user->verification_token;
0 ignored issues
show
The property verification_token does not exist on string.
Loading history...
40
        $confirmationUrl = route('register.confirm', compact('token'));
41
42
        return $this->markdown('emails.registrations.confirm', compact('name', 'confirmationUrl'));
43
    }
44
}
45