PHP code example of estey / hipsupport

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

    

estey / hipsupport example snippets


'HipSupport' => 'Estey\HipSupport\HipSupportFacade'
 bash
php artisan config:publish estey/hipsupport
 bash
php artisan hipsupport:online 480
 php
Route::post('chat', ['before' => 'csrf', function() {
    $room = HipSupport::init();
    if ($room) {
        return Redirect::to($room->hipsupport_url);
    }
}]);
 php
Route::post('chat', ['before' => 'csrf', function() {
    $room = HipSupport::init();

    if ($room) {
        if (Request::ajax()) {
            return Response::json(['url' => $room->hipsupport_url]);
        }
        return Redirect::to($room->hipsupport_url);
    }
}]);