PHPackages                             tricki/laravel-notification - 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. tricki/laravel-notification

ActiveLibrary

tricki/laravel-notification
===========================

A basic user notification package for Laravel 4

273158[3 issues](https://github.com/tricki/laravel-notification/issues)PHP

Since Dec 23Pushed 10y ago7 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 4 Notification
======================

[](#laravel-4-notification)

A basic starting point for a flexible user notification system in Laravel 4.

It is easily extendable with new notification types and leaves rendering completely up to you.

This package only provides an extendable notification system without any controllers or views since they are often very use case specific.

I'm open to ideas for extending this package.

Installation
------------

[](#installation)

### 1. Install with Composer

[](#1-install-with-composer)

```
composer require tricki/laravel-notification:@dev
```

This will update `composer.json` and install it into the `vendor/` directory.

(See the [Packagist website](https://packagist.org/packages/tricki/laravel-notification) for a list of available version numbers and development releases.)

### 2. Add to Providers in `config/app.php`

[](#2-add-to-providers-in-configappphp)

```
    'providers' => [
        // ...
        'Tricki\Notification\NotificationServiceProvider',
    ],
```

This registers the package with Laravel and automatically creates an alias called `Notification`.

### 3. Publishing config

[](#3-publishing-config)

If your models are namespaced you will have to declare this in the package configuration.

Publish the package configuration using Artisan:

```
php artisan config:publish tricki/laravel-notification
```

Set the `namespace` property of the newly created `app/config/packages/tricki/laravel-notification/config.php`to the namespace of your notification models.

#### Example

[](#example)

```
'namespace' => '\MyApp\Models\'

```

### 4. Executing migration

[](#4-executing-migration)

```
php artisan migrate --package="tricki/laravel-notification"
```

### 5. Adding relationship to User

[](#5-adding-relationship-to-user)

Extend your User model with the following relationship:

```
	public function notifications()
	{
		return $this->hasMany('\Tricki\Notification\Models\NotificationUser');
	}
```

Usage
-----

[](#usage)

### 1. Define notification models

[](#1-define-notification-models)

You will need separate models for each type of notification. Some examples would be `PostLikedNotification` or `CommentPostedNotification`.

These models define the unique behavior of each notification type like it's actions and rendering.

A minimal notification model looks like this:

```

```

```
// notifications.blade.php

	@foreach($user->notifications as $notification)
	{{ $notification->render() }}
	@endforeach

```

This could output:

```

	this is a post_liked notification
	this is a comment_posted notification

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6eb5237dd94f8f5389b1afeb3cfe798cb61f302d4816f6fec2d2a483b7a1cd1a?d=identicon)[tricki](/maintainers/tricki)

---

Top Contributors

[![tricki](https://avatars.githubusercontent.com/u/523154?v=4)](https://github.com/tricki "tricki (27 commits)")[![bepursuant](https://avatars.githubusercontent.com/u/10257655?v=4)](https://github.com/bepursuant "bepursuant (1 commits)")[![FooBarQuaxx](https://avatars.githubusercontent.com/u/2607178?v=4)](https://github.com/FooBarQuaxx "FooBarQuaxx (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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