usermp / eitaayar
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/usermp/eitaayar
Requires
- guzzlehttp/guzzle: ^7.2
This package is auto-updated.
Last update: 2025-10-15 11:27:14 UTC
README
This package provides a simple way to interact with the Eitaayar API for sending messages and documents to Eitaayar channel or groups.
Installation
To install this package, you can use Composer:
composer require usermp/eitaayar
Usage
To use this package, you need to have an Eitaayar API token.
Edit your .env file and add this const:
EITAAYAR_TOKEN={Eitaayar API token}
Sending a message
To send a text message to a chat, you can use the sendMessage() method. Here's an example:
use Eitaayar\Eitaayar;
// Send a message to the chat with ID 12345678
$message = Eitaayar::sendMessage(12345678, "Hello, world!");
The sendMessage() method returns an array with information about the message that was sent.
Sending a document
To send a document to a chat, you can use the sendDocument() method. Here's an example:
use Eitaayar\Eitaayar;
// Send a document to the chat with ID 12345678
$message = Eitaayar::sendDocument(12345678, "/path/to/document.pdf");
The sendDocument() method returns an array with information about the message that was sent.
License
Eitaayar API Client is open-sourced software licensed under the MIT license.