PHP code example of quadrogod / laravel-ejabberd

1. Go to this page and download the library: Download quadrogod/laravel-ejabberd 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/ */

    

quadrogod / laravel-ejabberd example snippets




return [
    'api' => env('EJABBERD_API', 'http://im.conversations.com/api'),
    
    'domain' => env('EJABBERD_DOMAIN', 'conversations.com'),
    'conference_domain' => env('EJABBERD_CONFERENCE_DOMAIN', 'conference.conversations.com'),
    'user' => env('EJABBERD_USER', 'admin'),
    'password' => env('EJABBERD_PASSWORD', 'password'),
    'debug' => env('EJABBERD_DEBUG', true)
];

'providers' => [
    // Other Service Providers

    Ejabberd\Providers\EjabberdServiceProvider::class
],

$app->configure('ejabberd')

$app->register(Ejabberd\Providers\EjabberdServiceProvider::class);

$create_user = new CreateUser($user, $password, $host);
$response = EjabberedFacade::createUser($create_user);

$send_message = new SendMessage($type, $from, $to, $subject, $body);
$response = EjabberedFacade::sendMessage($send_message);