Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Notification Log Laravel Package

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().

View on GitHub
Deep Wiki
Context7

title: Using your own notification log model weight: 3

By using your own notification log model, you can customize things like the database connection to be used, the pruning strategy and more.

To get started, create a class of your own that extends the NotificationLogItem. On that class you can add another property or function to customize behaviour.

use Spatie\NotificationLog\Models\NotificationLogItem;

class CustomLogItem extends NotificationLogItem
{
    
}

To let the package use your model, specify it in the model key of the notification-log config file.

return [
    /*
     * This model will be used to log all sent notifications
     */
    'model' => CustomLogItem::class,
    
    // ...
];
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony