PHPackages                             maxwkf/barsbank - 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. maxwkf/barsbank

ActiveLibrary[API Development](/categories/api)

maxwkf/barsbank
===============

Package Supporting Barsbank API

v1.01(3y ago)0121MITPHP

Since Jul 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/maxwkf/barsbank)[ Packagist](https://packagist.org/packages/maxwkf/barsbank)[ RSS](/packages/maxwkf-barsbank/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Barsbank
========

[](#barsbank)

This barsbank API allows you to operate API of . (Make Booking not implemented yet)

Installation
============

[](#installation)

Composer
--------

[](#composer)

You should have installed composer and install from the following command.

```
composer require maxwkf/barsbank
```

Running with laravel
--------------------

[](#running-with-laravel)

Copy and add key to config file and add your API key to it.

Run the following command. It will copy a config file to your /config folder

```
> php artisan vendor:publish --provider="Maxwkf\Barsbank\BarsbankServiceProvider" --tag="config"
```

Update the key attribute in the config file.

```
return [
  'key' => 'your-own-key'
];
```

How to use
==========

[](#how-to-use)

PHP without framework
---------------------

[](#php-without-framework)

```
$apiKey = "your-api-key";
$parkId = 2; // your park id
$apiClient = new \Maxwkf\Barsbank\ApiClient(apiKey: $apiKey, parkId: $parkId);

$apiClient
    ->setDateFrom('2022-12-01')
    ->setDateTo('2022-12-31')
    ->setNumberAdults(2)
    ->getAvailability()
    ;
```

Laravel
-------

[](#laravel)

1. Add the API key to your config file
2. Create your own Lodge Class interface such that you can wire up other API Client later on.

```
// /app/Services/Lodge.php
namespace App\Services;

interface Lodge {

    public function getAvailabilities();

    public function getValidStays();

    public function getParkAccommodation();

    public function getTourValidStays();

    public function getExtras();
}
```

3. Register Lodge class in AppServiceProvider.php and instantiate it with our API Client

```
app()->bind(Lodge::class, function () {

    $apiClient = (new \Maxwkf\Barsbank\ApiClient(
        apiKey: config('barsbank.key'),
        parkId: 2,
    ));

    return new BarsbankLodge($apiClient);
});
```

4. Create your own class to implement the Lodge Class and inject the ApiClient to this class

```
namespace App\Services;

use Maxwkf\Barsbank\ApiClient;

class BarsbankLodge implements Lodge {

    public function __construct(protected ApiClient $client) {

    }
    public function getAvailabilities() {
        $this->client
            ->setNumberAdults(1)
            ->setDateFrom('2022-09-26')
            ->setDateTo('2022-09-30')
            ;

        return $this->client->getAvailabilities();
    }
    public function getValidStays() {
        // your own implementation
    }

    // implement for other functions
}
```

5. Create your own controller and use the LodgeController directly from the web.php

```
//  /routes/web.php
Route::get('/testBarsbankApi', LodgeController::class);
```

```
// /app/Http/Controllers/LodgeController.php
namespace App\Http\Controllers;
use App\Services\Lodge;

use Illuminate\Http\Request;

class LodgeController extends Controller
{
    public function __invoke(Lodge $lodge) {// validate
        // $result = $lodge->getAvailabilities();

        dd($lodge->getAvailabilities());
    }
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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

Every ~0 days

Total

4

Last Release

1398d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82e8a62f0f7727ff67f03481250cd66f228468ef522e6bcee57b98d507e27283?d=identicon)[maxwkf](/maintainers/maxwkf)

---

Top Contributors

[![maxwkfcc](https://avatars.githubusercontent.com/u/92790117?v=4)](https://github.com/maxwkfcc "maxwkfcc (9 commits)")[![maxwkf](https://avatars.githubusercontent.com/u/6158797?v=4)](https://github.com/maxwkf "maxwkf (1 commits)")

### Embed Badge

![Health badge](/badges/maxwkf-barsbank/health.svg)

```
[![Health](https://phpackages.com/badges/maxwkf-barsbank/health.svg)](https://phpackages.com/packages/maxwkf-barsbank)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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