PHP code example of wsiservices / smartystreetsapi

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

    

wsiservices / smartystreetsapi example snippets


'providers' => [
	// ...

	WSIServices\SmartyStreetsAPI\Support\Laravel\Facade::class,
]

'aliases' => [
	// ...

	'SmartyStreetsAPI'	=> WSIServices\SmartyStreetsAPI\Support\Laravel\ServiceProvider::class,
]

return [

	'authentication' => [
		'secret' => [
			'auth-id'		=> '',
			'auth-token'	=> ''
		],
		'website' => [
			'auth-id'		=> ''
		]
	],

	...

	'request-class' => SmartyStreetsAPI\Request\cURL::class,

	...
];

use WSIServices\SmartyStreetsAPI;

$configuration = new Configuration($configArray);

$factory = new Factory(new Log);

$factory->setConfiguration($configuration);

$service = $factory->getService('us-street-address');

$service->getRequest($optionsArray);

$service->XStandardizeOnly();

$service->XIncludeInvalid();
shell
php artisan vendor:publish