difftechnology / notifynder
Management system of internal notifications for Laravel 5.*
dev-master
2017-01-19 11:42 UTC
Requires
- php: >=5.5.0
- doctrine/dbal: ^2.5
- illuminate/support: ~5.0
Requires (Dev)
- codeclimate/php-test-reporter: ^0.3.2
- laracasts/testdummy: ~2.0
- laravel/framework: ~5.0
- orchestra/testbench: ~3.0
- phpspec/phpspec: ~2.1
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-18 16:06:56 UTC
README
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