PHPackages                             spatie/laravel-notification-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. spatie/laravel-notification-log

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

spatie/laravel-notification-log
===============================

Log notifications sent by your Laravel app

1.4.1(2mo ago)207902.8k—3.6%22MITPHPPHP ^8.4CI passing

Since Feb 23Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/spatie/laravel-notification-log)[ Packagist](https://packagist.org/packages/spatie/laravel-notification-log)[ Docs](https://github.com/spatie/laravel-notification-log)[ RSS](/packages/spatie-laravel-notification-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (21)Used By (0)

 [   ![Logo for laravel-notification-log](https://camo.githubusercontent.com/835b75f2467888ac74d48fa6bbc20f6907b6e5d3d352bdd3af51f6780fa85166/68747470733a2f2f7370617469652e62652f7061636b616765732f6865616465722f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672f68746d6c2f6c696768742e776562703f31)  ](https://spatie.be/open-source?utm_source=github&utm_medium=banner&utm_campaign=laravel-notification-log)Log notifications sent by your Laravel app
==========================================

[](#log-notifications-sent-by-your-laravel-app)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f377a631a7705f2215bfdc8a2f274c5a502b5f9805fc134d36f50b0b7c838f78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-notification-log)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a6b0d53ac2cc3194f05f26ecb223e2b71c47985d4d7a01c69d8373edc2290eda/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7370617469652f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/spatie/laravel-notification-log/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d22c0a55a6bbd3d93445fcdbb29b4a9b10f7d09104a160cfef3e48f87d4eed04/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7370617469652f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/spatie/laravel-notification-log/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bf2b6e8c9866f5cce2e46a7fffe1bdeb69999c844efcf98015ef00352dab3d61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-notification-log)

This package will log all the notifications sent by your app. This will allow you to write logic based on the notifications your app has sent.

If you want to create a list of all notifications sent to a user

```
// returns a collection of `NotificationLogItem` models
$sentNotifications = $user->loggedNotifications();
```

In a view, you could write this:

```

@foreach($sentNotifications as $sentNotification)
    {{ $sentNotification->type }} at {{ $sentNotification->created_at->format('Y-m-d H:i:s') }}
@endforeach

```

The package also contains handy methods that allow you to make decisions based on the notifications sent. Here's an example, where we use the `wasSentTo` method provided by the package in a `shouldSend` method of a notification.

```
// in a notification

public function shouldSend($notifiable)
{
      return ! $this
        ->wasSentTo($notifiable)
        ->inThePastMinutes(60);
}
```

You can fully customize which notifications get logged and how they get logged.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/b1b0c2b41638232f98286901fd2cc5324a3aa772177a2b86a5c689dc970a599c/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d6e6f74696669636174696f6e2d6c6f672e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-notification-log)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Documentation
-------------

[](#documentation)

All documentation is available [on our documentation site](https://spatie.be/docs/laravel-notification-log).

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 75.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Recently: every ~178 days

Total

19

Last Release

68d ago

Major Versions

0.0.4 → 1.0.02023-02-26

PHP version history (3 changes)0.0.1PHP ^8.1

1.3.0PHP ^8.1|^8.2

1.4.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (134 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![andreasnij](https://avatars.githubusercontent.com/u/1712334?v=4)](https://github.com/andreasnij "andreasnij (3 commits)")[![jimirobaer](https://avatars.githubusercontent.com/u/8984769?v=4)](https://github.com/jimirobaer "jimirobaer (3 commits)")[![FrancisMawn](https://avatars.githubusercontent.com/u/45174482?v=4)](https://github.com/FrancisMawn "FrancisMawn (3 commits)")[![ceejayoz](https://avatars.githubusercontent.com/u/2825?v=4)](https://github.com/ceejayoz "ceejayoz (2 commits)")[![patrickomeara](https://avatars.githubusercontent.com/u/571773?v=4)](https://github.com/patrickomeara "patrickomeara (2 commits)")[![axtg](https://avatars.githubusercontent.com/u/61356?v=4)](https://github.com/axtg "axtg (2 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![imhayatunnabi](https://avatars.githubusercontent.com/u/44812376?v=4)](https://github.com/imhayatunnabi "imhayatunnabi (2 commits)")[![ao-jhelmich](https://avatars.githubusercontent.com/u/17061364?v=4)](https://github.com/ao-jhelmich "ao-jhelmich (2 commits)")[![WillTorres10](https://avatars.githubusercontent.com/u/31351166?v=4)](https://github.com/WillTorres10 "WillTorres10 (1 commits)")[![aminetiyal](https://avatars.githubusercontent.com/u/13120169?v=4)](https://github.com/aminetiyal "aminetiyal (1 commits)")[![briankiewel](https://avatars.githubusercontent.com/u/1514568?v=4)](https://github.com/briankiewel "briankiewel (1 commits)")[![chrysanthos](https://avatars.githubusercontent.com/u/48060191?v=4)](https://github.com/chrysanthos "chrysanthos (1 commits)")[![dwightwatson](https://avatars.githubusercontent.com/u/1100408?v=4)](https://github.com/dwightwatson "dwightwatson (1 commits)")[![gisostallenberg](https://avatars.githubusercontent.com/u/11526270?v=4)](https://github.com/gisostallenberg "gisostallenberg (1 commits)")[![kohenkatz](https://avatars.githubusercontent.com/u/88755?v=4)](https://github.com/kohenkatz "kohenkatz (1 commits)")[![lukasleitsch](https://avatars.githubusercontent.com/u/3009245?v=4)](https://github.com/lukasleitsch "lukasleitsch (1 commits)")

---

Tags

historylaravelnotificationphpspatielaravellaravel-notification-log

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/spatie-laravel-notification-log/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-laravel-notification-log/health.svg)](https://phpackages.com/packages/spatie-laravel-notification-log)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[spatie/laravel-discord-alerts

Send a message to Discord

151408.0k](/packages/spatie-laravel-discord-alerts)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
