Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppNotifications;
- use IlluminateBusQueueable;
- use IlluminateNotificationsNotification;
- use IlluminateContractsQueueShouldQueue;
- use IlluminateNotificationsMessagesMailMessage;
- class VerifyEmailNotification extends Notification implements ShouldQueue
- {
- use Queueable;
- protected $token;
- /**
- * Create a new notification instance.
- *
- * @return void
- */
- public function __construct($token)
- {
- $this->token = $token;
- }
- /**
- * Get the notification's delivery channels.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function via($notifiable)
- {
- return ['mail'];
- }
- /**
- * Get the mail representation of the notification.
- *
- * @param mixed $notifiable
- * @return IlluminateNotificationsMessagesMailMessage
- */
- public function toMail($notifiable)
- {
- return (new MailMessage)
- ->subject(config('constants.title') . ' - Please Verify Your Email')
- ->line('You are receiving this email because you have sign up on ' . config('constants.title') . '.')
- ->action('Verify Email', url(config('app.url').route('verify_email', ['token' => $this->token], false)))
- ->line('If you did not sign up on ' . config('constants.title') . ', no further action is required.');
- }
- /**
- * Get the array representation of the notification.
- *
- * @param mixed $notifiable
- * @return array
- */
- public function toArray($notifiable)
- {
- return [
- //
- ];
- }
- }
- php artisan view:clear
- php artisan queue:restart
- php artisan config:cache
- supervisorctl restart all
- php artisan queue:restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement