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().
By default, the package will log all notifications sent by your app. To turn off this behaviour, set the log_all_by_default key in the notification-log config file to false.
You can determine per notification whether it should be logged or not by adding a shouldLog method to your notification. If you return a truthy value the notification will be logged.
use Illuminate\Notifications\Events\NotificationSending;
// in a notification
public function shouldLog(NotificationSending $event): bool
{
return true;
}
How can I help you explore Laravel packages today?