PHPackages                             and48/laravel-wubook - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. and48/laravel-wubook

ActiveLibrary[API Development](/categories/api)

and48/laravel-wubook
====================

A WuBook bridge for Laravel 8.x https://wubook.net

1.0.0(3y ago)049MITPHP

Since Mar 28Pushed 3y agoCompare

[ Source](https://github.com/AND48/laravel-wubook)[ Packagist](https://packagist.org/packages/and48/laravel-wubook)[ Docs](https://github.com/and48/laravel-wubook)[ RSS](/packages/and48-laravel-wubook/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

WuBook library for Lravel 8
===========================

[](#wubook-library-for-lravel-8)

This version of Laravel Wubook was modified by Andrii Strilchuk, is based in the [ilgala/laravel-wubook](https://github.com/ilgala/laravel-wubook).

Installation
------------

[](#installation)

```
 composer require and48/laravel-wubook
```

Configuration
-------------

[](#configuration)

Laravel WuBook requires connection configuration.

Publish the package migrations files to your application.

```
php artisan vendor:publish --provider="AND48\LaravelWubook\WuBookServiceProvider" --tag="migrations"
```

This will create a `wubook_configs` table in your DB that you can modify to set your configuration (lcode and token).

Usage
-----

[](#usage)

##### WuBookManager

[](#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

[](#facadeswubook)

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

[](#wubook-api-methods-results)

The [fxmlrpc client](https://github.com/lstrojny/fxmlrpc) 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:

```
// An error occurred
return [
    'has_error' => true,
    'code' => -100,
    'data' => 'A human readeable error message'
];

// Success
return [
    'has_error' => false,
    'code' => 0,
    'data' => [ /* THE XML/RPC FUNCTION RESPONSE */ ]
];
```

##### Real Examples

[](#real-examples)

Here you can see an example of just how simple this package is to use:

```
use AND48\LaravelWubook\Facades\WuBook;
use AND48\LaravelWubook\Models\WubookConfig;

$credentials = WubookConfig::find(1)->only(['lcode', 'token']);
WuBook::rooms($credentials)->fetch_rooms();
// this example is simple, and there are far more methods available
// The result will be an associative array with this structure

[
    0 => [
        id => 123,
        name => 'room',
        shortname => 'ro',
        occupancy => 2,
        men => 2,
        children => 0,
        subroom => 0,
        // ...
    ],
    1 => [
        // ...
    ],
];
```

For more information on how to use the `\LaravelWubook\WuBookManager` class we are calling behind the scenes here, check out the [Wired API doc](https://tdocs.wubook.net/wired.html).

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Andrii Strilchuk at [cater\_pill@yahoo.com](mailto:cater_pill@yahoo.com). All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

Laravel WuBook is licensed under [The MIT License (MIT)](LICENSE).

Tests
-----

[](#tests)

For running the tests you must specify environment variables `LCODE` and `TOKEN`.

For Windows:

```
 set LCODE=1111
 set TOKEN=your_token
```

For Linux:

```
 LCODE=1111
 TOKEN=your_token
```

```
 composer test
 composer test-f RoomTest
```

It is recommended to run with empty account on the wubook.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1370d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b713b5a86c04c9541d4277206ffbcfd6a3df8f55d469b1e88b8435c6a7a89d9?d=identicon)[AND48](/maintainers/AND48)

---

Top Contributors

[![AND48](https://avatars.githubusercontent.com/u/34770539?v=4)](https://github.com/AND48 "AND48 (10 commits)")[![ilgala](https://avatars.githubusercontent.com/u/1577699?v=4)](https://github.com/ilgala "ilgala (6 commits)")

---

Tags

laravel-packagewubooklaravel-wubook

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/and48-laravel-wubook/health.svg)

```
[![Health](https://phpackages.com/badges/and48-laravel-wubook/health.svg)](https://phpackages.com/packages/and48-laravel-wubook)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[mahdimajidzadeh/laravel-unsplash

Laravel package for Unsplash Api

1111.4k](/packages/mahdimajidzadeh-laravel-unsplash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
