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;
public function shouldLog(NotificationSending $event): bool
{
return true;
}