Skip to content

Instantly share code, notes, and snippets.

@renepardon
Created October 2, 2017 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renepardon/ac49753590f1922bef6835cb6ea6b79d to your computer and use it in GitHub Desktop.
Save renepardon/ac49753590f1922bef6835cb6ea6b79d to your computer and use it in GitHub Desktop.
<?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