laravel-avantio-api maintained by upgradelabs
Laravel Avantio API Package
A Laravel package by Upgradelabs for interacting with the Avantio XML Feeds and WebServices API.
Requirements
- PHP ^8.3
- Laravel ^10.0
Installation
Require the package via Composer:
composer require upgradelabs/laravel-avantio-api
Publish the configuration file:
php artisan vendor:publish --provider="Upgradelabs\\Avantio\\AvantioServiceProvider" --tag="config"
Configure your .env with Avantio credentials:
AVANTIO_WSDL="https://ws.avantio.com/soap/vrmsConnectionServices.php?wsdl"
AVANTIO_USERNAME=your_username
AVANTIO_PASSWORD=your_password
AVANTIO_LANGUAGE=EN
Usage
You can use the Avantio facade or inject the Upgradelabs\\Avantio\\Client class:
use Avantio;
$result = Avantio::isAvailable([
'Accommodation' => [
'AccommodationCode' => 123,
'UserCode' => 456,
'LoginGA' => 'company_login'
],
'DateFrom' => '2025-06-01',
'DateTo' => '2025-06-10',
'Occupants' => [
'AdultsNumber' => 2
]
]);
Available Methods
isAvailable(array $criteria)getBookingPrice(array $criteria)setBooking(array $criteria)getBooking(array $criteria)cancelBooking(array $criteria)getBookingList(array $criteria)
Testing
Run the test suite with PHPUnit:
vendor/bin/phpunit
Publishing to Packagist
- Push your repository to GitHub.
- Submit the package on Packagist: https://packagist.org/packages/submit
License
MIT