Files
phpvms/app/Mail/NewLoginDetails.php
2018-08-26 16:40:04 +00:00

31 lines
716 B
PHP

<?php
namespace App\Mail;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class NewLoginDetails extends Mailable
{
use Queueable, SerializesModels;
public $subject;
public $user;
public $newpw;
public function __construct(User $user, $newpw = null, $subject = null)
{
$this->subject = $subject ?: 'New Login Details';
$this->newpw = $newpw ?: 'N/A';
$this->user = $user;
}
public function build()
{
return $this->markdown('emails.user.new_login_details')
->subject($this->subject)
->with(['user' => $this->user, 'newpw' => $this->newpw]);
}
}