PHPackages                             glocurrency/api-layer - 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. glocurrency/api-layer

AbandonedArchivedLibrary[API Development](/categories/api)

glocurrency/api-layer
=====================

Basic API package.

v0.1-alpha(5y ago)1122MITPHPPHP ^7.2

Since Jul 14Pushed 5y agoCompare

[ Source](https://github.com/glocurrency/api-layer)[ Packagist](https://packagist.org/packages/glocurrency/api-layer)[ RSS](/packages/glocurrency-api-layer/feed)WikiDiscussions master Synced 1w ago

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

Api Layer
=========

[](#api-layer)

[![Total Downloads](https://camo.githubusercontent.com/b6eef9c5331e81feac771f8a28e0adc1de6bce320cd47f8dce3fb3affde652e0/68747470733a2f2f706f7365722e707567782e6f72672f676c6f63757272656e63792f6170692d6c617965722f642f746f74616c2e737667)](https://packagist.org/packages/glocurrency/api-layer)[![Latest Stable Version](https://camo.githubusercontent.com/9e788304aaabf115d19c57a7a620cbabccb159208c20d37932766a8848c771cf/68747470733a2f2f706f7365722e707567782e6f72672f676c6f63757272656e63792f6170692d6c617965722f762f737461626c652e737667)](https://packagist.org/packages/glocurrency/api-layer)[![License](https://camo.githubusercontent.com/3f7f785cb808957629a43210e060600b0f228ba41b6c6b5ef338d6d14b8a5139/68747470733a2f2f706f7365722e707567782e6f72672f676c6f63757272656e63792f6170692d6c617965722f6c6963656e73652e737667)](https://packagist.org/packages/glocurrency/api-layer)

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

[](#installation)

```
composer require glocurrency/api-layer

```

### Passport

[](#passport)

This module use [Laravel Passport](https://github.com/laravel/passport) heavily. In order to make it work properly, follow the steps:

1. Run

```
php artisan glo:apilayer:passport

```

This command will:

- generate the keys
- copy the migrations from passport
- replace both `client_id` and `user_id` columns in migrations with UUID.

2. Copy the passport middlewares to the `$routeMiddleware` in your `app/Http/Kernel.php` file:

```
'client' => \Laravel\Passport\Http\Middleware\CheckClientCredentials::class,
'scopes' => \Laravel\Passport\Http\Middleware\CheckScopes::class,
'scope' => \Laravel\Passport\Http\Middleware\CheckForAnyScope::class,
```

3. Add the following code to the `boot` method of `AuthServiceProvider`:

```
use Glocurrency\ApiLayer\ApiLayer;

public function boot()
{
    $this->registerPolicies();

    ApiLayer::passport();
}
```

4. Generate both [Client](https://laravel.com/docs/master/passport#client-credentials-grant-tokens) and [Personal](https://laravel.com/docs/master/passport#creating-a-personal-access-client) grant tokens.

```
php artisan passport:client --client
php artisan passport:client --personal

```

After creating your personal access client, place the client's ID and plain-text secret value in your application's `.env` file:

```
PASSPORT_PERSONAL_ACCESS_CLIENT_ID=client-id-value
PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET=unhashed-client-secret-value
```

5. Use `UnauthenticatedTrait` in your `app/Exceptions/Handler.php` file:

```
use Glocurrency\ApiLayer\Traits\UnauthenticatedTrait;

class Handler extends ExceptionHandler
{
    use UnauthenticatedTrait;
```

License
-------

[](#license)

Glocurrency Api Layer is open-sourced software licensed under the [MIT license](LICENSE).

[![FOSSA Status](https://camo.githubusercontent.com/34398a628375af153c1f65e0fe781d0c85991b3cd3837ddb19985bf9b2536982/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246676c6f63757272656e63792532466170692d6c617965722e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fglocurrency%2Fapi-layer?ref=badge_large)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

2134d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/114f3c6e8506e0bba763451e8e4bcc3e94d662c2dce982a910b5d7b3444593cf?d=identicon)[brokeyourbike](/maintainers/brokeyourbike)

![](https://www.gravatar.com/avatar/d3822d45910b432b6b1cd54e79ba766da90ef640e5aadb8525badb867cd7b48e?d=identicon)[glocurrency](/maintainers/glocurrency)

---

Top Contributors

[![brokeyourbike](https://avatars.githubusercontent.com/u/1554371?v=4)](https://github.com/brokeyourbike "brokeyourbike (37 commits)")

---

Tags

passportapilaravelpassport

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/glocurrency-api-layer/health.svg)

```
[![Health](https://phpackages.com/badges/glocurrency-api-layer/health.svg)](https://phpackages.com/packages/glocurrency-api-layer)
```

PHPackages © 2026

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