PHPackages                             mrgla55/tabapi - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. mrgla55/tabapi

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mrgla55/tabapi
==============

An API Wrapper for the TAB Studio

v0.1.1(7y ago)0211MITPHPPHP &gt;=5.6

Since Sep 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mrgla55/Tabapi)[ Packagist](https://packagist.org/packages/mrgla55/tabapi)[ RSS](/packages/mrgla55-tabapi/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Tabapi
======

[](#tabapi)

TAB Studio REST API Client for Laravel 5

[![Laravel](https://camo.githubusercontent.com/232d618909dfd7f0bc8dbefecce911eb09e87dd73c4b1508e6b9641a2b9a1257/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e352d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Latest Stable Version](https://camo.githubusercontent.com/9e56cd10982b17e81839a8111c25280ee9c6a8c61694cf228fbc63d1f0cfeb7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d72676c6135352f5461626170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrgla55/Tabapi)[![Total Downloads](https://camo.githubusercontent.com/e4d3359ef2fc35cc412dc398a081a1e4808b3eaddd7866b7c2d7f5fe8beadd93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d72676c6135352f5461626170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrgla55/Tabapi)[![License](https://camo.githubusercontent.com/563784e9f1d3ea32f01cfdc703b826572655346eac7aaa7afb1e1cbc7147bc13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d72676c6135352f5461626170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrgla55/Tabapi)[![Build Status](https://camo.githubusercontent.com/36247da15bc435368083f3b2a01e72f7ec75b29bdb2b83bc922f92efb3e193ce/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d72676c6135352f5461626170692e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mrgla55/Tabapi)

TAB REST API client for Laravel.

While this package is built for Laravel, it has been decoupled so that it can be extended into any framework or vanilla PHP application. Currently the only support is for Laravel 4, 5 and Lumen.

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

[](#installation)

Tabapi can be installed through composer. Open your `composer.json` file and add the following to the `require` key:

```
"mrgla55/tabapi": "0.*"
```

Next run `composer update` from the command line to install the package.

### Laravel Installation

[](#laravel-installation)

Add the service provider and alias to your `config/app.php` file:

```
mrgla55\Tabapi\Providers\Laravel\TabapiServiceProvider::class
'Tabapi' => mrgla55\Tabapi\Providers\Laravel\Facades\Tabapi::class
```

> For Laravel 4, add `mrgla55\Tabapi\Providers\Laravel4\TabapiServiceProvider` in `app/config/app.php`. Alias will remain the same.

### Lumen Installation

[](#lumen-installation)

```
class_alias('mrgla55\Tabapi\Providers\Laravel\Facades\Tabapi', 'Tabapi');
$app->register(mrgla55\Tabapi\Providers\Lumen\TabapiServiceProvider::class);
$app->configure('Tabapi');
$app->withFacades();
```

Then you'll utilize the Lumen service provider by registering it in the `bootstrap/app.php` file.

### Configuration

[](#configuration)

You will need a configuration file to add your credentials. Publish a config file using the `artisan` command:

```
php artisan vendor:publish
```

You can find the config file in: `config/tabapi.php`

> For Lumen, you should copy the config file from `src/config/config.php` and add it to a `Tabapi.php` configuration file under a config directory in the root of your application.

> For Laravel 4, run `php artisan config:publish mrgla55/Tabapi`. It will be found in `app/config/mrgla55/Tabapi/config.php`

Getting Started
---------------

[](#getting-started)

### Setting up a TAB Studio Account

[](#setting-up-a-tab-studio-account)

1. Go to
2. You will need to have a valid TAB account number
3. Click register and complete the form. Registration approval normally takes 2-3 days.
4. Log in to TAB Studio
5. Click "Settings" from the top right menu
6. Note your Client Id and Client Secret and put them into your .env file as TAB\_CLIENT\_ID and TAB\_CLIENT\_SECRET, or update your tabapi config file.

### Setup

[](#setup)

Creating routes

##### Test API flow

[](#test-api-flow)

```
Route::get('/versions', function()
{
    return Tabapi::versions();
});
```

API Requests
------------

[](#api-requests)

All resources are requested dynamically using method overloading.

First, determine which resources you have access to by calling:

```
Tabapi::resources();
```

Result:

```
Array
(
    [account:authenticate] => https://webapi.tab.com.au/v1/account-service/tab/authenticate
    [account:balance] => https://webapi.tab.com.au/v1/account-service/tab/accounts/{accountNumber}/balance
	...
)
```

Next, call resources by referring to the specified key. Replace the colon ':' with and underscore '\_'. Embedded parameters in the base url are replaced with arguments. Any left over arguments are added to the query string.

For instance:

```
Tabapi::lookup_countries_allowed();
```

or

```
Tabapi::info_sports(['jurisdiction' => 'nsw']);
```

Custom Apex endpoints
---------------------

[](#custom-apex-endpoints)

For nested links or to call direct, you can use the custom() method for consuming them.

```
Tabapi::custom('/myEndpoint');
```

Additional options and parameters can be passed in like this:

```
Tabapi::custom('https://api.beta.tab.com.au/v1/tab-info-service/racing/dates/2018-11-06/meetings/R/Racing%20-%20Futures/races/Melbourne%20Cup%20(All%20In)', [
		'parameters' => ['jurisdiction' => 'VIC', 'fixedOdds' => 'true']
	]);
```

Read Creating REST APIs using Apex REST for more information.

For more information about Guzzle responses and event listeners, refer to their [documentation](http://guzzle.readthedocs.org).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

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 ~7 days

Total

2

Last Release

2829d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17374781?v=4)[John Hewitt](/maintainers/mrgla55)[@mrgla55](https://github.com/mrgla55)

---

Top Contributors

[![jhewitt-slatteryauctions](https://avatars.githubusercontent.com/u/17999228?v=4)](https://github.com/jhewitt-slatteryauctions "jhewitt-slatteryauctions (18 commits)")[![mrgla55](https://avatars.githubusercontent.com/u/17374781?v=4)](https://github.com/mrgla55 "mrgla55 (2 commits)")

---

Tags

apilaravelresttabracing

### Embed Badge

![Health badge](/badges/mrgla55-tabapi/health.svg)

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

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.1k38](/packages/dreamfactory-df-core)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37153.1k3](/packages/cybercog-youtrack-rest-php)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

162.0k](/packages/laragear-api-manager)

PHPackages © 2026

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