mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-02-23 14:59:07 +08:00
parent
a7b9d19b9b
commit
5a42f3c44d
@ -13,26 +13,16 @@ class EmailVerification extends Mailable
|
||||
|
||||
public $url;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$site_name = option_localized('site_name');
|
||||
|
||||
return $this->from(config('mail.from'))
|
||||
return $this
|
||||
->subject(trans('user.verification.mail.title', ['sitename' => $site_name]))
|
||||
->view('mails.email-verification');
|
||||
}
|
||||
|
@ -11,31 +11,18 @@ class ForgotPassword extends Mailable
|
||||
use Queueable;
|
||||
use SerializesModels;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $url = '';
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(string $url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$site_name = option_localized('site_name');
|
||||
|
||||
return $this->from(config('mail.from'))
|
||||
return $this
|
||||
->subject(trans('auth.forgot.mail.title', ['sitename' => $site_name]))
|
||||
->view('mails.password-reset');
|
||||
}
|
||||
|
@ -624,7 +624,6 @@ class AuthControllerTest extends TestCase
|
||||
$site_name = option_localized('site_name');
|
||||
$mailable = new ForgotPassword('url');
|
||||
$mailable->build();
|
||||
$this->assertTrue($mailable->hasFrom(config('mail.from.address')));
|
||||
$this->assertEquals(trans('auth.forgot.mail.title', ['sitename' => $site_name]), $mailable->subject);
|
||||
$this->assertEquals('mails.password-reset', $mailable->view);
|
||||
}
|
||||
|
@ -212,7 +212,6 @@ class UserControllerTest extends TestCase
|
||||
$site_name = option_localized('site_name');
|
||||
$mailable = new EmailVerification('url');
|
||||
$mailable->build();
|
||||
$this->assertTrue($mailable->hasFrom(config('mail.from.address')));
|
||||
$this->assertEquals(trans('user.verification.mail.title', ['sitename' => $site_name]), $mailable->subject);
|
||||
$this->assertEquals('mails.email-verification', $mailable->view);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user