gammamatrix / playground-cms-api
Playground: Provides an API, without a UI for interacting with Playground CMS, a Content Management System for Laravel applications.
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2025-02-16 02:57:55 UTC
README
The playground-cms-api
Laravel package.
This package provides an API, without a UI for interacting with the Playground CMS, a Content Management System for Laravel.
If you need a CMS 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.
- This same collection is viewable on the Postman: GammaMatrix Playground workspace.
Swagger
This application provides Swagger documentation: swagger.json.
- The endpoint models support locks, trash with force delete, restoring, revisions and more.
- Index endpoints support advanced query filtering.
Swagger API Documentation is built with npm.
- npm is only needed to generate documentation and is not needed to operate the CMS API.
See package.json requirements.
Install npm.
npm install
Build the documentation to generate the swagger.json 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 enviroment 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:(feature/GH-3) composer cloc
> cloc --exclude-dir=node_modules,output,vendor .
155 text files.
106 unique files.
50 files ignored.
github.com/AlDanial/cloc v 1.98 T=0.14 s (738.1 files/s, 178457.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
JSON 5 0 0 17312
PHP 67 605 1024 3462
YAML 28 7 2 2824
XML 3 0 7 221
Markdown 2 49 1 101
INI 1 3 0 12
-------------------------------------------------------------------------------
SUM: 106 664 1034 23932
-------------------------------------------------------------------------------
PHPStan
Tests at level 9 on:
config/
database/
routes/
src/
tests/Feature/
tests/Unit/
composer analyse
Coding Standards
composer format
Tests
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.