1. Go to this page and download the library: Download isidea/health-notifier library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
isidea / health-notifier example snippets
protected function schedule(Schedule $schedule)
{
$schedule->command('health-notifier:notify')->everyMinute();
}
'email' => [
// Включить или выключить email уведомления
'enabled' => (bool) env('HEALTH_NOTIFIER_EMAIL_ENABLED', true),
// адрес отправителя
'from' => env('HEALTH_NOTIFIER_EMAIL_FROM', '[email protected]'),
// тема письма
'subject' => env('APP_NAME') . ' App Health Notification',
// Список email получателей
'recipients' => env('HEALTH_NOTIFIER_EMAIL_RECIPIENTS', ['[email protected]']),
// Путь к blade-markdown шаблону для email
'markdown' => env('HEALTH_NOTIFIER_EMAIL_TEMPLATE', 'health-notifier::mail.notification'),
// mailer из конфига laravel
'mailer' => env('HEALTH_NOTIFIER_EMAIL_MAILER', 'smtp'),
],
'telegram' => [
// Включить или выключить Telegram уведомления
'enabled' => (bool) env('HEALTH_NOTIFIER_TELEGRAM_ENABLED', false),
// Chat ID для отправки уведомлений
'chat_id' => env('HEALTH_NOTIFIER_TELEGRAM_CHAT_ID', 'your-telegram-chat-id'),
// Токен Telegram-бота
'bot_token' => env('HEALTH_NOTIFIER_TELEGRAM_BOT_TOKEN', 'your-bot-token'),
// Путь к blade шаблону для сообщения
'template' => env('HEALTH_NOTIFIER_TELEGRAM_TEMPLATE', 'health_notifier::telegram.notification'),
]