mirror of
https://github.com/dyzulk/trustlab-api.git
synced 2026-01-26 05:15:35 +07:00
First commit
This commit is contained in:
50
app/Notifications/PendingEmailVerificationNotification.php
Normal file
50
app/Notifications/PendingEmailVerificationNotification.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
|
||||
class PendingEmailVerificationNotification extends VerifyEmail
|
||||
{
|
||||
/**
|
||||
* Build the mail representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||
*/
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
$verificationUrl = $this->verificationUrl($notifiable);
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(Lang::get('Verify Your New Email Address'))
|
||||
->view('emails.verify-email', [
|
||||
'name' => $notifiable->first_name . ' ' . $notifiable->last_name,
|
||||
'url' => $verificationUrl,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the verification URL for the given notifiable.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return string
|
||||
*/
|
||||
protected function verificationUrl($notifiable)
|
||||
{
|
||||
return parent::verificationUrl($notifiable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the recipient to the pending email.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user