PHP code example of disintegrations / eitaa-serializer-laravel
1. Go to this page and download the library: Download disintegrations/eitaa-serializer-laravel 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/ */
disintegrations / eitaa-serializer-laravel example snippets
use Disintegrations\EitaaSerializer\EitaaGatewayClient;
$response = app(EitaaGatewayClient::class)->send(
method: 'help.getConfig',
params: [],
token: null,
imei: null,
);
use Disintegrations\EitaaSerializer\Facades\Eitaa;
$response = Eitaa::send('help.getConfig');
$response = app(EitaaGatewayClient::class)->send(
method: 'messages.sendMessage',
params: [
'flags' => 0,
'peer' => [
'_' => 'inputPeerUser',
'user_id' => '123456789',
'access_hash' => '987654321',
],
'message' => 'Hello',
'random_id' => (string) random_int(1, PHP_INT_MAX),
],
token: $token,
imei: $imei,
);
bash
php artisan vendor:publish --tag=eitaa-config
bash
php artisan vendor:publish --tag=eitaa-schema