PHP code example of omcod / laravel-pachca-api-wrapper

1. Go to this page and download the library: Download omcod/laravel-pachca-api-wrapper 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/ */

    

omcod / laravel-pachca-api-wrapper example snippets

 bash
php artisan vendor:publish --provider='Omcod\LaravelPachcaApiWrapper\Providers\PachcaServiceProvider'
 php
$pachcaWrapper = new PachcaApi();
$jsonParameters = [
    "message" => [
        "entity_id" => 123123,
        "content"   => 'Hello world',
    ]
];

$pachcaWrapper->requestApiPachca("POST", '/messages', $jsonParameters);
 php
$pachcaWrapper = new PachcaApi();
$pachcaWrapper->sendMessage(123123, 'Hello world');