Blame view

app/Mail/MailRepair.php 1.09 KB
b6103c749   Андрей Ларионов   Обновление js и c...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  <?php
  
  namespace App\Mail;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Mail\Mailable;
  use Illuminate\Mail\Mailables\Address;
  use Illuminate\Mail\Mailables\Content;
  use Illuminate\Mail\Mailables\Envelope;
  use Illuminate\Queue\SerializesModels;
  
  class MailRepair extends Mailable
  {
      use Queueable, SerializesModels;
  
      protected $new_password;
  
      public function __construct($new_password)
      {
          $this->new_password = $new_password;
      }
  
      public function envelope(): Envelope
      {
          return new Envelope(
              from: new Address('jeffrey@example.com', 'Рассылка сообщений'),
              subject: 'Send add messages',
          );
      }
  
      public function content(): Content
      {
          return new Content(
              view: 'emails.RepairPassword',
          );
      }
  
      public function build()
      {
  
          // Вернуть все данные
          return $this->view('emails.RepairPassword', ['password' => $this->new_password]);
      }
  
  
      public function attachments(): array
      {
          return [];
      }
  }