gammamatrix/playground-cms

Playground:为Playground内容管理系统提供CMS模型。

dev-develop / 73.x-dev 2024-08-05 18:47 UTC

This package is auto-updated.

Last update: 2024-09-05 19:05:38 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 9

Playground CMS是Laravel应用程序的一个包。

此应用程序提供了使用Playground CMS(内容管理系统)的模型。

有关Playground CMS的更多信息,请参阅Read the Docs:Playground 文档。

安装

注意: 此包是以下项目的必需项

使用composer安装此包以获取对CMS模型的访问权限

composer require gammamatrix/playground-cms

artisan:about

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

screenshot of artisan about command with Playground CMS.

配置

默认情况下禁用迁移。此包有时可能安装在其他系统处理迁移的地方。

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

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

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

环境变量

  • 如果迁移已导出到您的应用程序中,则迁移加载选项无效。加载控制由包 ServiceProvider. 处理。

模型

此包包括factories、模型和migrations,用于

迁移

默认情况下禁用所有迁移。

查看已发布的配置文件内容:database/migrations

  • 注意:将创建4个表,它们确实有索引和唯一约束定义;然而,此次发行尚未包含外键约束迁移。

您可以使用以下命令发布迁移文件:

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

Cloc

composer cloc
➜  playground-cms git:(feature/GH-9) ✗ composer cloc
> cloc --exclude-dir=node_modules,output,vendor .
      46 text files.
      43 unique files.
       5 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.09 s (453.6 files/s, 159004.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                             6              0              0          11017
PHP                             29            264            838           2281
YAML                             1              5              0            275
XML                              3              0              7            215
Markdown                         3             44              0            111
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                            43            316            845          13911
-------------------------------------------------------------------------------

PHPStan

在第9级对以下进行测试

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

编码规范

composer format

测试

composer test

变更日志

请参阅CHANGELOG以获取有关最近更改的更多信息。

致谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件