2
0

ForgotPassword.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Mail;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Mail\Mailable;
  6. use Illuminate\Queue\SerializesModels;
  7. class ForgotPassword extends Mailable
  8. {
  9. use Queueable, SerializesModels;
  10. protected $uuid;
  11. protected $lang;
  12. protected $dashboard_url;
  13. /**
  14. * Create a new message instance.
  15. *
  16. * @return void
  17. */
  18. public function __construct(string $uuid,string $lang='en-US',string $dashboard=null)
  19. {
  20. //
  21. $this->uuid = $uuid;
  22. $this->lang = $lang;
  23. if($dashboard && !empty($dashboard)){
  24. $this->dashboard_url = $dashboard;
  25. }else{
  26. $this->dashboard_url = config('mint.server.dashboard_base_path');
  27. }
  28. }
  29. /**
  30. * Build the message.
  31. *
  32. * @return $this
  33. */
  34. public function build()
  35. {
  36. return $this->view('emails.reset_password.'.$this->lang)
  37. ->with([
  38. 'url' => $this->dashboard_url.'/anonymous/users/reset-password/'.$this->uuid,
  39. ]);
  40. }
  41. }