PHP code example of fei / chat-package

1. Go to this page and download the library: Download fei/chat-package 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/ */

    

fei / chat-package example snippets




use ObjectivePHP\Application\AbstractApplication;
use Fei\Service\Chat\Package\ChatPackage;

class Application extends AbstractApplication
{
    public function init()
    {
        /** @var AbstractApplication $this */

        // Define some application steps
        $this->addSteps('bootstrap', 'init', 'auth', 'route', 'rendering');
        
        // Initializations...

        // Plugging the Chat Package in the bootstrap step
        $this->getStep('bootstrap')
        ->plug(ChatPackage::class);

        // Another initializations...
    }
}


use Fei\Service\Chat\Package\Config\ChatBaseUrl;

return [
    (new ChatBaseUrl())->setBaseUrl('http://chat.dev:8181'),
];