difftechnology / notifynder
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-09-23 15:20:50 UTC
README
步骤 1
在您的 composer.json
中添加它
"difftechnology/notifynder": ""
并运行
composer update
步骤 2
将以下字符串添加到 config/app.php
提供者数组
Difftechnology\Notifynder\NotifynderServiceProvider::class,
别名数组
'Notifynder'=>Difftechnology\Notifynder\Facades\Notifynder::class,
步骤 3
迁移
使用以下命令发布迁移以及notifynder的配置
php artisan vendor:publish --provider="Difftechnology\Notifynder\NotifynderServiceProvider"
运行迁移
php artisan migrate
快速使用
设置通知类别,将其视为通知的主体
php artisan notifynder:create:category "user.following" "{from.username} started to follow you"
要使用notifynder发送通知,您只需这样做。
Notifynder::category('user.following') ->from($from_user_id) ->to($to_user_id) ->url('http://www.yourwebsite.com/page') ->send();
检索通知
// @return Collection Notifynder::getAll($user_id,$limit,$paginateBool);
读取通知
// @return number of notifications read Notifynder::readAll($user_id);
要了解更多信息,例如Notifynder的高级使用,请访问 Notifynder Wiki。
由fenos/Notifynder分支而来