PHPackages                             neilherbertuk/celcatwebapi - 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. neilherbertuk/celcatwebapi

AbandonedArchivedLibrary[API Development](/categories/api)

neilherbertuk/celcatwebapi
==========================

Laravel Celcat Web API Integration

1241[1 issues](https://github.com/neilherbertuk/celcatwebapi/issues)PHP

Since Nov 23Pushed 6y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Celcat Web API Integration
==================================

[](#laravel-celcat-web-api-integration)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fd95bff3e2c52b83cc3f5a6d84e8665a025e07c98aafd8d612527e46d2457c41/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e65696c68657262657274756b2f63656c6361747765626170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/neilherbertuk/celcatwebapi/?branch=master) [![Build Status](https://camo.githubusercontent.com/a3d302e9fb9b421d0d68291438597d9273cd45fb4279e99ee3a9acda7a06d5b2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e65696c68657262657274756b2f63656c6361747765626170692f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/neilherbertuk/celcatwebapi/build-status/master)

This package provides access to the Celcat Web API as documented on the [Celcat Wiki - Web API](https://www.celcat.wiki/en/guides/developers_guides/webapi/webapi) page. This package has only been tested with Celcat 7 where the WebAPI is in beta.

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

[](#installation)

Require the package using composer

```
$ composer require neilherbertuk/celcatwebapi:dev-master
```

If you are using `Laravel 5.5+` package auto-discovery should register the `CelcatWebAPIServiceProvider::class` and `CelcatWebAPI` facade for you.

If you are using `Laravel 5.4` or lower you will need to register the service provider and facade within your `config\app.php` file

### Service Provider

[](#service-provider)

Add the following to your `providers` list within `config\app.php`

```
    neilherbertuk\celcatwebapi\CelcatWebAPIServiceProvider::class,
```

### Facade

[](#facade)

Add the following to your `aliases` list within `config\app.php`

```
    'CelcatWebAPI' => neilherbertuk\celcatwebapi\Facades\CelcatWebAPI::class,
```

### Config File

[](#config-file)

If you would like to edit the config file you will need to publish it. All configuration items can be set using the `.env` file.

```
    $php artisan vendor:publish
```

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

[](#configuration)

Configuration can be set within your `config\celcat.php` file, or via your `.env` file.

The following must be provided in order to talk to the Celcat Web API

`ServerAddress` - Celcat Web API's Address, this must be https and should not include a trailing slash (/)

```
    CELCAT_WEB_API_SERVER_ADDRESS=https://localhost:5000/api
```

`APICode` - The API Code generated and put into your `appsettings.production.json` file as described on the [Celcat Wiki - Web API - Security](https://www.celcat.wiki/en/guides/developers_guides/webapi/security) page.

```
    CELCAT_WEB_API_APICODE=123ABCDEfGHijKL4
```

`VerifySSL` - Whether to verify the Server SSL Certificate or not

```
    CELCAT_WEB_API_VERIFY_SSL=true
```

`PEM` - Location of the Certificate PEM if using self-signed certificates on the Celcat Web API server.

```
    CELCAT_WEB_API_PEM=storage/CelcatWebAPI/cert.pem
```

`Debug` - Enabled detailed logging

```
    CELCAT_WEB_API_DEBUG=false
```

`Proxy` - Proxy Server Address if required

```
   -- Used for both http and https --
    CELCAT_WEB_API_PROXY=http://localproxy:8080
    -- or --
    CELCAT_WEB_API_PROXY_HTTP=http://localproxy:8080
    CELCAT_WEB_API_PROXY_HTTPS=https://localproxy:8080

    -- Bypass proxy for addresses seperated by spaces --
    CELCAT_WEB_API_PROXY_BYPASS=*.domain.com
```

Usage
-----

[](#usage)

All of the functionality of this package can be accessed through the `CelcatWebAPI` Laravel Facade or using `app()->make('CelcatWebAPI')`. For the sake of uniformity and ease, all usage examples will access the package via the Laravel Facade.

### Available Resources

[](#available-resources)

The following api resources have been implemented

Resource Name`Rooms``Groups``Students``StudentMembership`You can use any of the below methods on any of the available resources listed above

#### Get All

[](#get-all)

Using the getAll() method on a resource will return all results.

```
    CelcatWebAPI::resource()->getAll();
```

##### GetAll Optional: pageSize - number of entries to get per request

[](#getall-optional-pagesize---number-of-entries-to-get-per-request)

By default, getAll() will use a pageSize of 1,000 and perform as many requests as needed to get all results. You can change the pageSize to increase or reduce the number of requests made by passing an integer into the `getAll()` operator.

Example

The following will request 100 results per api call until all results have been received.

```
CelcatWebAPI::resource()->getAll(100);
```

#### Get

[](#get)

Using the get() method on a resource will by default return the first 50 results.

Example

```
CelcatWebAPI::resource()->get();
```

Result

```
array:3 [▼
  "pagination" => array:3 [▼
    "TotalRows" => 200
    "TotalPages" => 4
    "CurrentPage" => 0
  ]
  "data" => array:1 [▼
    0 => array:2 [▼
      "id" => 0
      "name" => "Some Name"
    ]
    1 => array:2 [▼
      "id" => 1
      "name" => "Some Other Name"
    ]
    2 => array:2[...]
    3 => array:2[...]
    ...
    49 => array:2[...]

  ]
]

```

##### Get Optional: pageSize - number of results to return

[](#get-optional-pagesize---number-of-results-to-return)

You can change the number of results returned by including an integer within the method signature.

Example

The following will return the first 100 results.

```
CelcatWebAPI::resource()->get(100);
```

Result

```
array:3 [▼
  "pagination" => array:3 [▼
    "TotalRows" => 200
    "TotalPages" => 2
    "CurrentPage" => 0
  ]
  "parameters" => array:2 [▼
    "pageSize" => 100
    "page" => 0
  ]
  "data" => array:1 [▼
    0 => array:2 [▼
      "id" => 0
      "name" => "Some Name"
    ]
    1 => array:2 [▼
      "id" => 1
      "name" => "Some Other Name"
    ]
    2 => array:2[...]
    3 => array:2[...]
    ...
    99 => array:2[...]

  ]
]

```

##### Get Optional: page - results page to return

[](#get-optional-page---results-page-to-return)

If the total number of results are higher than that returned, the results become paginated. You can request the page by using the `Where()` operator.

Example

The following will return page 2 or results 51 - 100

```
CelcatWebAPI::resource()->where(['page' => 2])->get();
```

Result

```
array:3 [▼
  "pagination" => array:3 [▼
    "TotalRows" => 200
    "TotalPages" => 4
    "CurrentPage" => 2
  ]
  "parameters" => array:2 [▼
    "page" => 2
  ]
  "data" => array:1 [▼
    50 => array:2 [▼
      "id" => 0
      "name" => "Some Name"
    ]
    1 => array:2 [▼
      "id" => 1
      "name" => "Some Other Name"
    ]
    2 => array:2[...]
    3 => array:2[...]
    ...
    99 => array:2[...]
  ]
]

```

The following will return page 3 or results 301 - 400

```
CelcatWebAPI::resource()->where(['page' => 3])->get(100);
```

#### First

[](#first)

Using the first() method on a resource will return the first result.

```
CelcatWebAPI::resource()->first();
```

```
array:3 [▼
  "pagination" => array:3 [▼
    "TotalRows" => 2103
    "TotalPages" => 2103
    "CurrentPage" => 0
  ]
  "parameters" => array:2 [▼
    "pageSize" => 1
    "page" => 0
  ]
  "data" => array:1 [▼
    0 => array:2 [▼
      "id" => 0
      "name" => "Some Name"
    ]
  ]
]

```

#### Where

[](#where)

The where operator allows you to define parameters for a query. Setting parameters on the `get` and `getAll` operators have been removed.

```
CelcatWebAPI::resource()->where(['uniqueName' => '1234'])->get();
```

```
array:3 [▼
  "pagination" => array:3 [▼
    "TotalRows" => 2103
    "TotalPages" => 2103
    "CurrentPage" => 0
  ]
  "parameters" => array:2 [▼
    "pageSize" => 1
    "page" => 0
  ]
  "data" => array:1 [▼
    0 => array:2 [▼
      "id" => 0
      "uniqueName" => "1234"
      "name" => "Some Name"
    ]
  ]
]

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![neilherbertuk](https://avatars.githubusercontent.com/u/5868029?v=4)](https://github.com/neilherbertuk "neilherbertuk (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

celcatcelcat-timetablecelcat-web-apilaravel

### Embed Badge

![Health badge](/badges/neilherbertuk-celcatwebapi/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M270](/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.1M453](/packages/google-gax)

PHPackages © 2026

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