hotifyru/hotify

dev-master 2022-07-06 12:17 UTC

This package is auto-updated.

Last update: 2025-07-06 19:37:33 UTC


README

Using

Just a few lines of code:

$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();

That's all!

Laravel

You can use this package as a Laravel logger.

php artisan vendor:publish --provider="Hotify\Hotify\HotifyServiceProvider" --tag="config"

Create log config in config/logging.php

...
'hotify' => [
    'driver' => 'custom',
    'via'    => \Hotify\Hotify\HotifyLogger::class,
    'level'  => 'debug',
],
...

And use it!

Log::channel('hotify')->info('Hello world');