Installation
Step 1
Add it on your composer.json
, (*1)
"difftechnology/notifynder": ""
and run, (*2)
composer update
Step 2
Add the following string to config/app.php
, (*3)
Providers array:, (*4)
Difftechnology\Notifynder\NotifynderServiceProvider::class,
Aliases array:, (*5)
'Notifynder'=>Difftechnology\Notifynder\Facades\Notifynder::class,
Step 3
Migration
Publish the migration as well as the configuration of notifynder with the following command:, (*6)
php artisan vendor:publish --provider="Difftechnology\Notifynder\NotifynderServiceProvider"
Run the migration, (*7)
php artisan migrate
Quick Usage
Set up category of notification, think about it as the
body of the notification:, (*8)
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., (*9)
Notifynder::category('user.following')
->from($from_user_id)
->to($to_user_id)
->url('http://www.yourwebsite.com/page')
->send();
Retrieving Notifications, (*10)
// @return Collection
Notifynder::getAll($user_id,$limit,$paginateBool);
Reading Notifications:, (*11)
// @return number of notifications read
Notifynder::readAll($user_id);
To know more, such as the advance usage of Notifynder Visit the Notifynder Wiki., (*12)
Forked from
fenos/Notifynder, (*13)