This package provides a simple way to interact with the Eitaayar API for sending messages and documents to Eitaayar channel or groups.
To install this package, you can use Composer:
composer require usermp/eitaayar
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}
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.
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.
Eitaayar API Client is open-sourced software licensed under the MIT license.