PHP code example of saiba / ymapi

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

    

saiba / ymapi example snippets


"    "saiba/ymapi": "1.0.*"
},

composer update

'providers' => array(
    'Saiba\Ymapi\YmapiServiceProvider'
);

php artisan config:publish saiba/ymapi



use Saiba\Ymapi\Events\Event;

Route::get('/', function()
{
    $event = new Event();
    $events = $event->getIds();

    dd($events);
});



use Saiba\Ymapi\People\Person;

Route::get('/', function()
{
    $params = [
        'SearchText' => 'Gerhard'
    ];

    $person = new Person();
    $result = $person->search($params);

    dd($result);
});



use Saiba\Ymapi\People\Person;

Route::get('/', function()
{
    $params = [
        'EmailAddr' => '[email protected]',
        'FirstName' => 'John',
        'LastName' => 'Doe',
        'Membership' => 'SAIBA Member & Business Accountant in Practice',
        'MembershipExpiry' => '2060-10-05 00:00:00',
        'MemberTypeCode' => '2014SAIBAMEM',
        'Username' => 'Johnd',
        'Password' => 'ThisismyPassword'
    ];

    $person = (new Person())->create($params);

    dd($person);

});