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 today

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

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

1444d 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

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M974](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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