PHP code example of think.studio / laravel-6connex

1. Go to this page and download the library: Download think.studio/laravel-6connex 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/ */

    

think.studio / laravel-6connex example snippets


/** @var SixConnexOutput $output */
$output = SixConnex::usersRequest('read', [
        'email'=>'[email protected]', 
        'event_id' => 123
    ])
    ->call()
    ->outputFirst();
    
if($output->successful()) {
    $address = $output->json('address1');
    $events = $output->collect('events');
}

SixConnex::usersRequest()
    ->setApiCall('read')
    ->addOption('email', '[email protected]')
    ->call()
    ->json();

SixConnex::usersRequest()
    ->setApiCall('read')
    ->addOption('email', '[email protected]')
    ->addOption('event_id', 123)
    ->call()
    ->json();

SixConnex::usersRequest()
    ->setApiCall('read')
    ->addOption(['email'=>'[email protected]', 'event_id' => 123])
    ->call()
    ->json();

 SixConnex::usersRequest('read', [
        'email'=>'[email protected]', 
        'event_id' => 123
    ])
    ->addNewCall(
        ( new \LaravelSixConnex\SixConnexCall )->addOption('email', '[email protected]')
    )
    ->addNewCall(
        ( new \LaravelSixConnex\SixConnexCall )->addOption(['email' => '[email protected]'])
    )
    ->call()
    ->json();
bash
php artisan vendor:publish --provider="LaravelSixConnex\ServiceProvider" --tag="config"