flajsg / holidaycheck by flajsg

This is a wrapper for HolidayCheck API for Laravel 4.2
7
0
1
Package Data
Maintainer Username: flajsg
Maintainer Contact: gregor.flajs@ors.si (ors)
Package Create Date: 2016-12-15
Package Last Update: 2016-12-19
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:16:03
Package Statistics
Total Downloads: 7
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

holidaycheck

This is a Laravel 4.2 wrapper for PHP parser for HolidayCheck XML api.

Dependencies

This wrapper uses ors/holidaycheck-api:1.0.* for parsing data.

Installation

To install the package you must run composer require ors/holidaycheck and set service provider and alias in your app.php file.

To include service provider add this line in 'providers' array:

'Ors\Holidaycheck\HolidaycheckServiceProvider',

And make sure you've added aliases in 'aliases' array:

'HolidayCheck' => 'Ors\Holidaycheck\Facades\HolidayCheckFacade',

Publishing migrations and configuration:

You will need some custom configurations so make sure you have published config files:

php artisan config:publish ors/holidaycheck

Basic Usage

Get detailed information about a hotel (using holiday check unique hotel id):

$hotel = HolidayCheck::hotel(49415);

A list of hotels

$hotels = HolidayCheck::hotels(array(), '', 10);

A list of hotel ratings:

$ratings = HolidayCheck::hotelRatings(16);

A list of hotel reviews:

$ratings = HolidayCheck::hotelReviews(16, array(), false, 'entryDate', 10);	

A single review (using holiday check unique hotel review id):

$review = HolidayCheck::hotelReview(2159596);