holidaycheck
This is a Laravel 4.2 wrapper for PHP parser for HolidayCheck XML api., (*1)
Dependencies
This wrapper uses ors/holidaycheck-api:1.0.* for parsing data., (*2)
Installation
To install the package you must run composer require ors/holidaycheck and set service provider and alias in your app.php file., (*3)
To include service provider add this line in 'providers' array:, (*4)
'Ors\Holidaycheck\HolidaycheckServiceProvider',
And make sure you've added aliases in 'aliases' array:, (*5)
'HolidayCheck' => 'Ors\Holidaycheck\Facades\HolidayCheckFacade',
Publishing migrations and configuration:, (*6)
You will need some custom configurations so make sure you have published config files:, (*7)
php artisan config:publish ors/holidaycheck
Basic Usage
Get detailed information about a hotel (using holiday check unique hotel id):, (*8)
$hotel = HolidayCheck::hotel(49415);
A list of hotels, (*9)
$hotels = HolidayCheck::hotels(array(), '', 10);
A list of hotel ratings:, (*10)
$ratings = HolidayCheck::hotelRatings(16);
A list of hotel reviews:, (*11)
$ratings = HolidayCheck::hotelReviews(16, array(), false, 'entryDate', 10);
A single review (using holiday check unique hotel review id):, (*12)
$review = HolidayCheck::hotelReview(2159596);