PHPackages                             gammamatrix/playground-directory-api - 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. gammamatrix/playground-directory-api

ActiveLibrary[API Development](/categories/api)

gammamatrix/playground-directory-api
====================================

Playground: Provides an API, without a UI for interacting with Playground Directory, a Directory System for Laravel applications.

08PHPCI passing

Since Oct 4Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/gammamatrix/playground-directory-api)[ Packagist](https://packagist.org/packages/gammamatrix/playground-directory-api)[ RSS](/packages/gammamatrix-playground-directory-api/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Playground: Directory API
=========================

[](#playground-directory-api)

[![Playground CI Workflow](https://github.com/gammamatrix/playground-directory-api/actions/workflows/ci.yml/badge.svg?branch=develop)](https://raw.githubusercontent.com/gammamatrix/playground-directory-api/testing/develop/testdox.txt)[![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground-directory-api/testing/develop/coverage.svg)](tests)[![PHPStan Level 10](https://camo.githubusercontent.com/022b70e6631d055205dfebf2aa7e53b3f63e7a3ea04a18e86429f279e29a29f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e)](.github/workflows/ci.yml#L128)

Playground: Directory API

This package provides an API without UI for interacting with the [Playground: Directory](https://github.com/gammamatrix/playground-directory), a model package for Laravel.

If you need a JSON API with a UI, then have a look at [Playground: Directory Resource.](https://github.com/gammamatrix/playground-directory-resource)

Documentation
-------------

[](#documentation)

Read more on using [Playground: Directory API at Read the Docs: Playground Documentation](https://gammamatrix-playground.readthedocs.io/en/develop/built-components/directory.html)

### Postman

[](#postman)

A postman collection is provided in the repository: [postman-playground-directory-api.json.](postman-playground-directory-api.json)

- This same collection is viewable on the .

### OpenAPI

[](#openapi)

This application provides OpenAPI documentation: [openapi.yaml](openapi.yaml).

- The endpoint models support locks, trash with force delete, restoring, revisions and more.
- Index endpoints support advanced query filtering.

OpenAPI API Documentation is built with npm using Redocly.

- npm is only needed to generate documentation and is not needed to operate the Playground: Directory API API.

See [package.json](package.json) requirements.

Install npm.

```
npm install
```

Build the documentation to generate the [openapi.yaml](openapi.yaml) configuration.

```
npm run docs
```

Documentation

- Preview [openapi.yaml on the Redocly Editor UI.](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/gammamatrix/playground-directory-api/develop/openapi.yaml)

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

[](#installation)

You can install the package via composer:

```
composer require gammamatrix/playground-directory-api
```

`artisan about`
---------------

[](#artisan-about)

Playground provides information in the `artisan about` command.

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

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --provider="Playground\Directory\Api\ServiceProvider" --tag="playground-config"
```

All routes are enabled by default. They may be disabled via environment variable or the configuration.

See the contents of the published config file: [config/playground-directory-api.php](config/playground-directory-api.php)

You can publish the routes file with:

```
php artisan vendor:publish --provider="Playground\Directory\Api\ServiceProvider" --tag="playground-routes"
```

- The routes while be published in a folder at `routes/playground-directory-api`

### Environment Variables

[](#environment-variables)

If you are unable or do not want to publish [configuration files for this package](config/playground-directory-api.php), you may override the options via system environment variables.

Information on [environment variables is available on the wiki for this package](https://github.com/gammamatrix/playground-directory-api/wiki/Environment-Variables)

Migrations
----------

[](#migrations)

This package requires the migrations in [playground-directory](https://github.com/gammamatrix/playground-directory) a Laravel package.

Cloc
----

[](#cloc)

```
composer cloc
```

```
➜  playground-directory-api git:(develop) ✗ composer cloc
     209 text files.
     202 unique files.
      49 files ignored.

github.com/AlDanial/cloc v 2.06  T=0.06 s (3167.2 files/s, 432312.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                            78              0              0          14954
YAML                            30              5              0           6390
PHP                             80            866           1211           3638
XML                             10              0              7            302
Markdown                         3             55              1            128
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                           202            929           1219          25424
-------------------------------------------------------------------------------

```

PHPStan
-------

[](#phpstan)

Tests at level 10 on:

- `config/`
- `lang/`
- `routes/`
- `src/`
- `tests/Feature/`
- `tests/Unit/`

```
composer analyse
```

Coding Standards
----------------

[](#coding-standards)

```
composer format
```

Testing
-------

[](#testing)

Run unit tests:

```
composer test
```

Run unit and feature tests:

```
composer test-dev
```

Run unit and feature tests in parallel:

```
composer test-parallel
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance47

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

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.

### Community

Maintainers

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

---

Top Contributors

[![gammamatrix](https://avatars.githubusercontent.com/u/524724?v=4)](https://github.com/gammamatrix "gammamatrix (5 commits)")

### Embed Badge

![Health badge](/badges/gammamatrix-playground-directory-api/health.svg)

```
[![Health](https://phpackages.com/badges/gammamatrix-playground-directory-api/health.svg)](https://phpackages.com/packages/gammamatrix-playground-directory-api)
```

###  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.1M452](/packages/google-gax)

PHPackages © 2026

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