Download the PHP package peyman-manteali/telegram-notifier without Composer
On this page you can find all versions of the php package peyman-manteali/telegram-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download peyman-manteali/telegram-notifier
More information about peyman-manteali/telegram-notifier
Files in peyman-manteali/telegram-notifier
Package telegram-notifier
Short Description A simple Laravel package to send messages to Telegram using the Telegram Bot API.
License MIT
Informations about the package telegram-notifier
Telegram Notifier
Telegram Notifier is a Laravel package for sending messages to Telegram via the Telegram Bot API. This package provides an easy way to integrate Telegram notifications in your Laravel application.
Requirements
- PHP 8.0 or higher
- Laravel 11
- Guzzle HTTP client
Installation
To install the package, use Composer:
Usage
After installation, you can use the Telegram class to send messages to a Telegram chat.
Example
Parameters
$message: The message text to send to Telegram.$botToken: Your Telegram bot token.$chatId: The chat ID where the message should be sent.-
$parseMode(optional): Defines the formatting style for the message. Supported values are:- HTML
- Markdown
- MarkdownV2
Error Handling
If an error occurs while sending the message, the function will return a JSON response with the error message and a 500 status code.
License
This package is open-source and licensed under the MIT License.