notifylog/laravel
最新稳定版本:v1.0.0
Composer 安装命令:
composer require notifylog/laravel
包简介
Real-time event notification
README 文档
README
A library for sending notifications using the NotifyLog API.
Installation
To install the library, run the following command:
composer require notifylog/laravel
Configuration
To use the library, configure your Account Token in .env
NOTIFYLOG_ACCOUNT_TOKEN=[account_token]
You can find your Account Token here
Test your Configuration
run
php artisan notifylog:test
Usage
Then, you can use NotifyLog publish method to send a notification from within your controller
<?php namespace App\Http\Controllers; use Illuminate\Routing\Controller as BaseController; use NotifyLog\Laravel\NotifyLog; class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; function index(NotifyLog $notifyLog){ $event = [ "name" => "NotifyLog Laravel Plugin", "description" => "Hello world from Laravel", "channel" => "from-laravel", "icon" => "💸", "notify" => true, "tags" => [ "my-tag" => "my-tag-value", ], "message" => "[Link](https://google.com)", ]; // Use: $notifyLog->publish($event); // or, you can also use the helper // without the need to inject // NotifyLog into the controller // by calling notifylog()->publish($event);
Support
If you need help, please send an email to hello@notifylog.com.
Create an account
To create an account on the NotifyLog platform, visit https://notifylog.com.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-16