PHP code example of infusionweb / laravel-marketo-rest-api

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

    

infusionweb / laravel-marketo-rest-api example snippets


'providers' => [
    //
    InfusionWeb\Laravel\Marketo\MarketoClientProvider::class,
];

'aliases' => [
    //
    'Marketo' => InfusionWeb\Laravel\Marketo\MarketoClientFacade::class,
];



use Marketo;

$fields = [
    'email' => '[email protected]',
    'firstName' => 'Example',
    'lastName' => 'User',
];

try {
    $result = Marketo::createOrUpdateLead($fields);
}
catch(\InfusionWeb\Laravel\Marketo\Exceptions\MarketoClientException $e) {
    die('We couldn’t save your information!');
}
bash
$ php artisan vendor:publish --provider="InfusionWeb\Laravel\Marketo\MarketoClientProvider"