Created
October 2, 2017 04:10
-
-
Save renepardon/ac49753590f1922bef6835cb6ea6b79d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Mail\Trainer; | |
use App\I18nTrait; | |
use App\Model\User; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Mail\Mailable; | |
use Illuminate\Queue\SerializesModels; | |
/** | |
* Class Welcome | |
* | |
* @package App\Mail\Trainer | |
*/ | |
class Welcome extends Mailable | |
{ | |
use Queueable, SerializesModels, I18nTrait; | |
/** | |
* @var User | |
*/ | |
public $user; | |
/** | |
* @param User $user | |
*/ | |
public function __construct(User $user) | |
{ | |
$this->user = $user; | |
} | |
/** | |
* Build the message. | |
* | |
* @return $this | |
*/ | |
public function build() | |
{ | |
$this->setUserLocale($this->user->flag->interface_language); | |
$this->subject(trans('Welcome to aerobictrainer.fitness', [], 'de')); | |
return $this->view('emails.trainer.welcome-de', | |
[ | |
'user' => $this->user, | |
] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment