<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
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 \Illuminate\Notifications\Messages\MailMessage
*/
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 [
//
];
}
}
Я использую уведомление по электронной почте laravel 5.5. Я изменил это почтовое уведомление, но оно где-то закешировалось. Мое приложение отправляет мне почту со старым содержимым, а не с текущим фрагментом кода, которым я поделился здесь. Я использую супервизор для мониторинга процессов очереди.
Я также очистил кеш представления, выполнив команду ниже, но она работает
php artisan view:clear
Я также перезапустил очередь
php artisan queue:restart
я тоже побежал
php artisan config:cache
но ничего не работает для меня.
Эта проблема может быть связана с супервайзером?