spatie/laravel-notification-log
Logs all notifications sent by your Laravel app, storing them as NotificationLogItems so you can query what was sent to a user, display notification history, and make sending decisions (e.g., avoid duplicates) via helpers like wasSentTo() and inThePastMinutes().
The notification_log_items table has a JSON column called extra that allows you to store any value you want.
To fill up the extra column, add a function named logExtra to your notification and let it return an array that should be stored in the extra column when the notification gets logged.
use Illuminate\Notifications\Events\NotificationSending;
// in a notification
public function logExtra(NotificationSending $event): array
{
return ['extraKey' => 'extraValue'];
}
How can I help you explore Laravel packages today?