InviteMail.php 858 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Mail;
  3. use App\Models\Invite;
  4. use Illuminate\Bus\Queueable;
  5. use Illuminate\Contracts\Queue\ShouldQueue;
  6. use Illuminate\Mail\Mailable;
  7. use Illuminate\Queue\SerializesModels;
  8. class InviteMail extends Mailable
  9. {
  10. use Queueable, SerializesModels;
  11. protected $uuid;
  12. protected $lang;
  13. /**
  14. * Create a new message instance.
  15. *
  16. * @return void
  17. */
  18. public function __construct(string $uuid,string $lang='en-US')
  19. {
  20. //
  21. $this->uuid = $uuid;
  22. $this->lang = $lang;
  23. }
  24. /**
  25. * Build the message.
  26. *
  27. * @return $this
  28. */
  29. public function build()
  30. {
  31. return $this->view('emails.invite.'.$this->lang)
  32. ->with([
  33. 'url' => env('DASHBOARD_URL').'/anonymous/users/sign-up/'.$this->uuid,
  34. ]);
  35. }
  36. }