Wallogit.com
2017 © Pedro Peláez
GoFax API
This SDK provides simple access to the GoFax SOAP API. It currently handles the following requests, (*1)
Install the SDK into your project using Composer., (*2)
composer require heshanh/gofax
This package ships with a Laravel specific service provider which allows you to set your credentials from your configuration file and environment., (*3)
Add the following to the providers array in your config/app.php file., (*4)
heshanh\GoFax\LaravelServiceProvider::class
In your config/services.php file, add the following to the array., (*5)
'gofax'=> [
'api_url' => env('FAX_API_URL'),
'api_key' => env('FAX_API_KEY'),
]
In your .env file, add the following keys., (*6)
FAX_API_KEY= FAX_API_URL=
To resolve a client, you simply pull it from the service container. This can be done in a few ways., (*7)
use heshanh\GoFax;
public function yourControllerMethod(SoapClient $client) {
// Call methods on $client
}
app() helperuse heshanh\GoFax;
public function anyMethod() {
$client = app(SoapClient::class);
// Call methods on $client
}
$client->getFunctions() $client->getReceivedFaxes() $client->getFaxDataFromId($faxId)
Refer to the GoFax API documentation for further information https://www.gofax.com.au/fax-api/, (*8)
Coming soon, (*9)