How to render/preview a notification for debugging

themodernpk

Pradeep Kumar

Posted on July 19, 2023

How to render/preview a notification for debugging

You generally send notification like:

$notification = (new ExampleNotification());
$user->notify($notification);
Enter fullscreen mode Exit fullscreen mode

To Debug this and preview, you can do:

$notification = (new ExampleNotification())->toMail('test@test.com');

echo $notification->render();
die();
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
themodernpk
Pradeep Kumar

Posted on July 19, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related