2016-09-06 12:23:14 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use App\Facade\Theme;
|
|
|
|
use App\Facade\UserConfig;
|
|
|
|
use App\User;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
|
|
|
class UserActivationRequired extends Mailable
|
|
|
|
{
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
|
|
|
private $user;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct(User $user)
|
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
2016-09-06 13:48:52 +01:00
|
|
|
$subject = trans('email.activation_required_subject', ['app_name' => UserConfig::get('app_name')]);
|
|
|
|
|
2016-09-06 12:23:14 +01:00
|
|
|
return $this
|
2016-09-06 13:48:52 +01:00
|
|
|
->subject($subject)
|
2016-09-06 12:23:14 +01:00
|
|
|
->view(Theme::viewName('email.user_activation_required'))
|
|
|
|
->with([
|
2016-09-06 13:48:52 +01:00
|
|
|
'subject' => $subject,
|
2016-09-06 12:23:14 +01:00
|
|
|
'user' => $this->user
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|