gammamatrix/playground-cms-api

Playground:提供API,用于与Playground CMS交互,Playground CMS是一个用于Laravel应用程序的内容管理系统,无UI界面。

dev-develop / 73.x-dev 2024-08-16 01:43 UTC

This package is auto-updated.

Last update: 2024-09-16 01:57:58 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 9 src and tests

playground-cms-api Laravel包。

此包提供API,用于与Playground CMS交互,Playground CMS是Laravel的内容管理系统。

如果您需要一个带有UI的CMS,请查看Playground CMS Resource。

文档

在Read the Docs上了解更多关于Playground CMS API的信息:Playground文档。

Postman

在存储库中提供Postman集合:postman-playground-cms-api.json。

Swagger

此应用程序提供Swagger文档:swagger.json

  • 端点模型支持锁定、强制删除垃圾箱、恢复、版本等。
  • 索引端点支持高级查询过滤。

Swagger API文档是用npm构建的。

  • npm仅用于生成文档,运行CMS API时不需要。

查看package.json的要求。

安装npm。

npm install

构建文档以生成swagger.json配置。

npm run docs

文档

安装

您可以通过composer安装此包

composer require gammamatrix/playground-cms-api

artisan about

Playground在artisan about命令中提供信息。

配置

您可以使用以下命令发布配置文件

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

默认情况下,所有路由都已启用。您可以通过环境变量或配置来禁用它们。

查看已发布的配置文件内容:config/playground-cms-api.php

您可以使用以下命令发布路由文件

php artisan vendor:publish --provider="Playground\Cms\Api\ServiceProvider" --tag="playground-routes"
  • 路由将被发布在routes/playground-cms-api文件夹中

环境变量

如果您无法或不想发布此包的配置文件,您可以通过系统环境变量覆盖选项。

有关环境变量的信息可在该包的维基上找到

迁移

本包需要playground-cms中的迁移,playground-cms是一个Laravel包。点击此处查看

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

在9级上进行的测试

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

编码规范

composer format

测试

composer test

变更日志

有关最近更改的更多信息,请参阅变更日志