DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on

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

Top comments (0)