gammamatrix/playground-cms-api

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

Installs: 29

Dependents: 1

Suggesters: 1

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/gammamatrix/playground-cms-api

dev-develop / 74.x-dev 2025-10-04 02:03 UTC

This package is auto-updated.

Last update: 2025-10-04 02:06:11 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 10

Playground: CMS API

This package provides an API without UI for interacting with the Playground: CMS, a model package for Laravel.

If you need a JSON API with a UI, then have a look at Playground: CMS Resource.

Documentation

Read more on using Playground: CMS API at Read the Docs: Playground Documentation

Postman

A postman collection is provided in the repository: postman-playground-cms-api.json.

OpenAPI

This application provides OpenAPI documentation: 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: CMS API API.

See package.json requirements.

Install npm.

npm install

Build the documentation to generate the openapi.yaml configuration.

npm run docs

Documentation

Installation

You can install the package via composer:

composer require gammamatrix/playground-cms-api

artisan about

Playground provides information in the artisan about command.

Configuration

You can publish the config file with:

php artisan vendor:publish --provider="Playground\Cms\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-cms-api.php

You can publish the routes file with:

php artisan vendor:publish --provider="Playground\Cms\Api\ServiceProvider" --tag="playground-routes"
  • The routes while be published in a folder at routes/playground-cms-api

Environment Variables

If you are unable or do not want to publish configuration files for this package, you may override the options via system environment variables.

Information on environment variables is available on the wiki for this package

Migrations

This package requires the migrations in playground-cms a Laravel package.

Cloc

composer cloc
➜  playground-cms-api git:(develop) ✗ composer cloc
     210 text files.
     203 unique files.
      49 files ignored.

github.com/AlDanial/cloc v 2.06  T=0.06 s (3375.2 files/s, 519960.9 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                            79              0              0          18171
YAML                            30              5              0           6327
PHP                             80            866           1211           3630
XML                             10              0              7            853
Markdown                         3             57              1            130
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                           203            931           1219          29123
-------------------------------------------------------------------------------

PHPStan

Tests at level 10 on:

  • config/
  • lang/
  • routes/
  • src/
  • tests/Feature/
  • tests/Unit/
composer analyse

Coding Standards

composer format

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

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.