2018-07-15 17:42:03 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
|
|
|
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.
|
|
|
|
*
|
2018-07-18 11:04:34 +08:00
|
|
|
* @param string $url
|
2018-07-15 17:42:03 +08:00
|
|
|
* @return void
|
|
|
|
*/
|
2018-07-18 11:04:34 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|