hotifyru / hotify
Hotify.ru
dev-master
2022-07-06 12:17 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0
- monolog/monolog: ^1.23|^2.0
This package is auto-updated.
Last update: 2024-09-06 17:28:30 UTC
README
使用
只需几行代码
$apiToken = YOUR_TOKEN_HERE; $appId = YOUR_APP_ID_OR_TAG_HERE; $hotify = new Hotify($apiToken); $hotify ->title('First notification') //optional ->text('Hello World!') ->to($appId) ->send();
这就完了!
Laravel
您可以将此包用作Laravel日志记录器。
php artisan vendor:publish --provider="Hotify\Hotify\HotifyServiceProvider" --tag="config"
在 config/logging.php 中创建日志配置
... 'hotify' => [ 'driver' => 'custom', 'via' => \Hotify\Hotify\HotifyLogger::class, 'level' => 'debug', ], ...
然后使用它!
Log::channel('hotify')->info('Hello world');