blessing-skin-server/app/Mail/ForgotPassword.php

43 lines
812 B
PHP
Raw Normal View History

2018-07-15 17:42:03 +08:00
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class ForgotPassword extends Mailable
{
use Queueable, SerializesModels;
/**
* @var string
*/
2018-08-16 18:10:09 +08:00
public $url = '';
2018-07-15 17:42:03 +08:00
/**
* Create a new message instance.
*
* @param string $url
2018-07-15 17:42:03 +08:00
* @return void
*/
public function __construct(string $url)
2018-07-15 17:42:03 +08:00
{
2018-08-16 18:10:09 +08:00
$this->url = $url;
2018-07-15 17:42:03 +08:00
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
2018-07-15 18:19:23 +08:00
$site_name = option_localized('site_name');
2018-07-15 17:42:03 +08:00
return $this->from(config('mail.username'), $site_name)
2018-08-16 18:10:09 +08:00
->subject(trans('auth.forgot.mail.title', ['sitename' => $site_name]))
->view('mails.password-reset');
2018-07-15 17:42:03 +08:00
}
}