DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on

1

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs