Download the PHP package and48/laravel-wubook without Composer
On this page you can find all versions of the php package and48/laravel-wubook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download and48/laravel-wubook
More information about and48/laravel-wubook
Files in and48/laravel-wubook
Package laravel-wubook
Short Description A WuBook bridge for Laravel 8.x https://wubook.net
License MIT
Homepage https://github.com/and48/laravel-wubook
Informations about the package laravel-wubook
WuBook library for Lravel 8
This version of Laravel Wubook was modified by Andrii Strilchuk, is based in the ilgala/laravel-wubook.
Installation
Configuration
Laravel WuBook requires connection configuration.
Publish the package migrations files to your application.
This will create a wubook_configs
table in your DB that you can modify to set your configuration (lcode and token).
Usage
WuBookManager
This is the class of most interest. It is bound to the ioc container as 'wubook'
and can be accessed using the Facades\WuBook
facade. In order to make a call to the Wired API, you may call these methods that refers to a specific area of the service.
availability()
prices()
reservations()
restrictions()
rooms()
Facades\WuBook
This facade will dynamically pass static method calls to the 'wubook'
object in the ioc container which by default is the WuBookManager
class.
WuBook API methods results
The fxmlrpc client always returns an associative array, that may be changed by the package in order to retrieve the resulting data from the XML/RPC function.
If an error occured during the call, a WuBookException
will be thrown. If the call is successfully executed an array will be returned with this values:
Real Examples
Here you can see an example of just how simple this package is to use:
For more information on how to use the \LaravelWubook\WuBookManager
class we are calling behind the scenes here, check out the Wired API doc.
Security
If you discover a security vulnerability within this package, please send an e-mail to Andrii Strilchuk at [email protected]. All security vulnerabilities will be promptly addressed.
License
Laravel WuBook is licensed under The MIT License (MIT).
Tests
For running the tests you must specify environment variables LCODE
and TOKEN
.
For Windows:
For Linux:
It is recommended to run with empty account on the wubook.
All versions of laravel-wubook with dependencies
zendframework/zend-diactoros Version ^2.2
php-http/message Version ^1.13
php-http/guzzle7-adapter Version ^1.0
lstrojny/fxmlrpc Version ^0.22.0