difftechnology / Notifynder by oms

Management system of internal notifications for Laravel 5.*
32
0
1
Package Data
Maintainer Username: oms
Maintainer Contact: admin@onlinemediaspace.com (difftechnology)
Package Create Date: 2017-01-19
Package Last Update: 2017-01-19
Language: PHP
License: MIT
Last Refreshed: 2024-04-22 03:03:23
Package Statistics
Total Downloads: 32
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Installation

Step 1

Add it on your composer.json

"difftechnology/notifynder": ""

and run

composer update

Step 2

Add the following string to config/app.php

Providers array:

Difftechnology\Notifynder\NotifynderServiceProvider::class,

Aliases array:

'Notifynder'=>Difftechnology\Notifynder\Facades\Notifynder::class,

Step 3

Migration

Publish the migration as well as the configuration of notifynder with the following command:

php artisan vendor:publish --provider="Difftechnology\Notifynder\NotifynderServiceProvider"

Run the migration

php artisan migrate

Quick Usage

Set up category of notification, think about it as the body of the notification:

php artisan notifynder:create:category "user.following" "{from.username} started to follow you"

To send a notification with notifynder, that's all you have to do.

Notifynder::category('user.following')
            ->from($from_user_id)
            ->to($to_user_id)
            ->url('http://www.yourwebsite.com/page')
            ->send();

Retrieving Notifications

// @return Collection
Notifynder::getAll($user_id,$limit,$paginateBool);

Reading Notifications:

// @return number of notifications read
Notifynder::readAll($user_id);

To know more, such as the advance usage of Notifynder Visit the Notifynder Wiki.

Forked from fenos/Notifynder