PHPackages                             anzware/avail - 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. anzware/avail

ActiveLibrary[API Development](/categories/api)

anzware/avail
=============

An API based availability calendar for Laravel 4.2

v0.9.0(9y ago)120MITPHPPHP &gt;=5.4.0

Since Dec 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/anz507/avail)[ Packagist](https://packagist.org/packages/anzware/avail)[ RSS](/packages/anzware-avail/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

avail
=====

[](#avail)

An API based availability calendar for Laravel 4.2

Require Carbon\\Carbon but already supplied by Laravel 4.2

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

[](#installation)

`composer require anzware/avail`

avail schema
------------

[](#avail-schema)

run `php artisan migrate --package="anzware/avail"`

**avail\_calendars**

```
$table->bigIncrements('calendar_id');
$table->string('calendar_name', 255);
$table->string('status', 15);
$table->timestamps();

```

**avail\_bookings**

```
$table->bigIncrements('booking_id');
$table->bigInteger('calendar_id');
$table->date('calendar_date');
$table->bigInteger('state_id');
// external_booking_ids could be integer or string depending on external id data type
// assuming string as data type for good measure
$table->string('external_booking_id', 255)->nullable();
$table->timestamps();

```

Use *external\_booking\_id* to link your actual booking ID

**avail\_states**

```
$table->bigIncrements('state_id');
$table->string('state', 100);
$table->tinyInteger('state_order')->nullable()->default(0);
$table->timestamps();

```

APIs
----

[](#apis)

### Getting calendar with data

[](#getting-calendar-with-data)

`GET /avail/api/get-calendar-with-data`

**Parameters**

integer `take` (optional) - the amount of months needed to be displayed (default: 3)

integer `page` (optional) - indicate the pagination starting from current month (default: 1)

integer `calendar_id` (required) - the calendar ID

### Getting calendar list

[](#getting-calendar-list)

`GET /avail/api/get-calendar`

**Parameters**

integer `calendar_id` (optional) - the calendar ID

### Getting state list

[](#getting-state-list)

`GET /avail/api/get-state`

**Parameters**

integer `state_id` (optional) - the state ID

### Creating new calendar

[](#creating-new-calendar)

`POST /avail/api/post-new-calendar`

**Parameters**

string `name` (required) - the calendar name

string `status` (required) - calendar status ('active', 'inactive')

### Update existing calendar

[](#update-existing-calendar)

`POST /avail/api/post-update-calendar`

**Parameters**

integer `calendar_id` (required) - the calendar ID

string `name` (optional) - the calendar name

string `status` (optional) - calendar status ('active', 'inactive')

### Creating new state

[](#creating-new-state)

`POST /avail/api/post-new-state`

**Parameters**

integer `calendar_id` (required) - the calendar ID

string `name` (optional) - the calendar name

string `status` (optional) - calendar status ('active', 'inactive')

### Update existing state

[](#update-existing-state)

`POST /avail/api/post-update-state`

**Parameters**

integer `state_id` (required) - the state ID

string `state` (optional) - the name of the state

integer `state_order` (optional) - the order of the state, for displaying purpose

### Creating booking items

[](#creating-booking-items)

`POST /avail/api/post-new-booking`

**Parameters**

integer `calendar_id` (required) - the calendar ID

integer `state_id` (required) - the state ID

array `dates` (required) - selected dates

string `external_booking_id` (optional) - external booking ID (your actual booking detail ID)

### Deleting booking items

[](#deleting-booking-items)

`POST /avail/api/post-release-booking`

**Parameters**

integer `calendar_id` (required) - the calendar ID

array `dates` (required) - selected dates

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

3427d ago

### Community

---

Top Contributors

[![anz507](https://avatars.githubusercontent.com/u/6212359?v=4)](https://github.com/anz507 "anz507 (21 commits)")

### Embed Badge

![Health badge](/badges/anzware-avail/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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