3
0
Fork 0
This repository has been archived on 2024-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
ThemeParkPlus-Panel/app/Notifications/SendMailChange.php
2020-02-26 14:59:58 +01:00

49 lines
1.2 KiB
PHP

<?php
namespace App\Notifications;
use App\ChangeEmail;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Queue\SerializesModels;
class SendMailChange extends Mailable
{
use Queueable, SerializesModels;
/**
* The order instance.
*
* @var ChangeEmail
*/
public $change;
/**
* Create a new message instance.
*
* @param ChangeEmail $change
*/
public function __construct(ChangeEmail $change)
{
$this->change = $change;
}
/**
* Build the message.
*
* @return MailMessage
*/
public function build()
{
$user = User::findOrFail($this->change->user_id);
return (new MailMessage)
->subject('Change Email')
->line('Dear '.$user->firstname.',')
->line('Press the button bellow if you wish to change your current email-address')
->action('Change Email', url('/change/email/'.$user->id.'/'.$this->change->token.'/'.$this->change->email))
->line('Is this email not directed to you or do you not wish to change your email? Than you may ignore this.');
}
}