First Commit
This commit is contained in:
commit
0c9a118281
633 changed files with 76612 additions and 0 deletions
48
app/Mail/MailResetPassword.php
Normal file
48
app/Mail/MailResetPassword.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class MailResetPassword extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $token;
|
||||
public $subject;
|
||||
|
||||
|
||||
public function __construct($token, $user)
|
||||
{
|
||||
|
||||
$this->token = $token;
|
||||
$this->user = $user;
|
||||
$this->subject = __('Reset Password');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('Dear customer').",";
|
||||
if($this->user->account){
|
||||
if($this->user->account->salutation == "mr"){
|
||||
$salutation = __('Dear Sir')." ".$this->user->account->last_name.",";
|
||||
}else{
|
||||
$salutation = __('Dear Mrs')." ".$this->user->account->last_name.",";
|
||||
}
|
||||
}
|
||||
|
||||
return $this->view('emails.auth')->with([
|
||||
'url' => route('password.reset', $this->token),
|
||||
'salutation' => $salutation,
|
||||
'button' => __('Reset Password'),
|
||||
'copy1line' => __('Dear Customer you will receive this e-mail because we have received a request to reset the password for your account.'),
|
||||
'copy2line' => __('Or copy this link into the address bar of your browser.'),
|
||||
'greetings' => __('Best regards'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue