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

ActiveLibrary

tashkar18/notification
======================

Simple Notification System for Laravel 4.2

0.3(10y ago)0111PHPPHP &gt;=5.4.0

Since Nov 19Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (0)

Notification (Laravel 4)
========================

[](#notification-laravel-4)

Quick Start
-----------

[](#quick-start)

### Required Setup

[](#required-setup)

Require `tashkar18\notification` with the composer command

```
$ composer require tashkar18/notification ~0.2
```

In your `config/app.php` file,

add `Tashkar18\Notification\NotificationServiceProvider` to the end of the `providers` array

```
  'providers' => array(
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Tashkar18\Notification\NotificationServiceProvider',
  ),
```

Now generate the configuration file

```
$ php artisan config:publish tashkar18/notification
```

Then migrate the `notifications` table

```
$ php artisan migrate --package="tashkar18/notification"
```

### Setup

[](#setup)

In any of your `Eloquent` models, implement the `NotificationInterface` and use the `NotificationTrait`.

```
use Tashkar18\Notification\NotificationInterface;
use Tashkar18\Notification\NotificationTrait;

class Comment extends Eloquent implements NotificationInterface
{
    use NotificationTrait;
```

Then implement these methods in your model.

```
/**
 * This determines the recipient id of the event.
 * For example, if a user comments on a post, the recipient of the
 * notification would be the post's author.
 * @return {int}
 */
public function getNotificationRecipient()
{
    return $this->post->user_id;
}

/**
 * This determines the sender id of the event.
 * For example, if a user comments on a post, the sender of the
 * notification would be the comment's author. (This will typically
 * be user_id, but you might also use a different attribute for the user_id like author_id);
 * @return {int}
 */
public function getNotificationSender()
{
    return $this->user_id;
}
```

You can add the `NoterTrait` to the your `User` model to setup the user `hasMany` relationship

```
use Tashkar18\Notification\NoterTrait;

class User extends Eloquent implements UserInterface, RemindableInterface {

    use UserTrait, RemindableTrait, NoterTrait;
```

You will then be able to access user notifications

```
return $user->notifications;
```

### Configuration

[](#configuration)

Create your `Notification`-specific views folder, and adjust the `packages/tashkar18/notification/config.php` to match

```
  return array(
      'view' => 'notifications'
  );
```

### Create your `ViewPresenter` for your `Eloquent` model.

[](#create-your-viewpresenter-for-your-eloquent-model)

Your view presenter file is simply a `view` file that will present your notification in human readable text.

For example, a Comment model would have a view file in `views\notifications\comment.blade.php`The `comment` object will automatically be passed into that view and can be access with the variable `$comment`.

```
// views/notifications/comment.blade.php
{{{ ucfirst($comment->user->username) }}} commented on your post.
```

### Testing (coming soon)

[](#testing-coming-soon)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~45 days

Total

4

Last Release

3693d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b2ceafd34948c9225a38d0f9b9da5f74b938c6753352227052fb63c8f5fd295?d=identicon)[tashkar18](/maintainers/tashkar18)

---

Top Contributors

[![tamerashkar](https://avatars.githubusercontent.com/u/8474125?v=4)](https://github.com/tamerashkar "tamerashkar (11 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[livewire-filemanager/filemanager

A simple, friendly and practical Livewire filemanager for your applications

3587.6k1](/packages/livewire-filemanager-filemanager)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)

PHPackages © 2026

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