gammamatrix/ site-laravel
游乐场:此包提供了一个使用Sanctum进行身份验证和授权、使用Blade进行UI的Laravel(users.id是一个整数)网站。还提供了一个内容管理系统,以及用户和设置管理。
dev-develop / 73.x-dev
2024-03-25 06:25 UTC
Requires
- php: ^8.2
- gammamatrix/playground-admin-resource: dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0
- gammamatrix/playground-cms-resource: dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0
- gammamatrix/playground-login-blade: dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0
- gammamatrix/playground-site-blade: dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0
- laravel/framework: ^11.0
- laravel/sanctum: ^4.0
- laravel/tinker: ^2.9
Requires (Dev)
- fakerphp/faker: ^1.23
- friendsofphp/php-cs-fixer: ^3.41
- gammamatrix/playground-test: dev-develop|dev-master|dev-feature/*|^73.0@dev|^73.0
- larastan/larastan: ^2.0
- laravel/pint: ^1.13
- laravel/sail: ^1.26
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.0
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^11.0
- spatie/laravel-ignition: ^2.4
This package is auto-updated.
Last update: 2024-09-25 07:39:01 UTC
README
此包包含一个标准的Laravel安装,并带有playground-site-blade包。
- 这使用了一个标准的Laravel用户,具有递增的ID。
- 要使用UUID作为User模型的键,请使用site-playground。
更多信息请参阅Read the Docs:Playground文档中的Site: Laravel。
可以使用composer create-project
安装此包
composer create-project gammamatrix/site-laravel site-example --stability dev
- 注意 需要发布一个稳定的版本才能使用
create-project
已安装的Playground包
已安装的支持Playground包
composer require --dev gammamatrix/playground-test
composer require gammamatrix/playground-site-blade
composer require gammamatrix/playground-login-blade
composer require gammamatrix/playground-admin-resource
php artisan install:api
- 安装Sanctum
- 更新用户模型以启用Sanctum:
use HasApiTokens
注意 禁用默认的Laravel欢迎路由。
测试
此应用程序支持使用已安装的Playground包运行集成测试。
- 目前,已运行超过800个单元和特性测试。
<testsuites> <testsuite name="Unit"> <directory>tests/Unit</directory> <directory>vendor/gammamatrix/playground/tests/Unit</directory> <directory>vendor/gammamatrix/playground-auth/tests/Unit</directory> <directory>vendor/gammamatrix/playground-blade/tests/Unit</directory> <directory>vendor/gammamatrix/playground-admin/tests/Unit</directory> <directory>vendor/gammamatrix/playground-admin-resource/tests/Unit</directory> <directory>vendor/gammamatrix/playground-cms/tests/Unit</directory> <directory>vendor/gammamatrix/playground-cms-resource/tests/Unit</directory> <directory>vendor/gammamatrix/playground-http/tests/Unit</directory> <directory>vendor/gammamatrix/playground-test/tests/Unit</directory> </testsuite> <testsuite name="Feature"> <directory>tests/Feature</directory> <directory>vendor/gammamatrix/playground/tests/Feature</directory> <directory>vendor/gammamatrix/playground-auth/tests/Feature</directory> <directory>vendor/gammamatrix/playground-blade/tests/Feature</directory> <directory>vendor/gammamatrix/playground-admin/tests/Feature</directory> <directory>vendor/gammamatrix/playground-admin-resource/tests/Feature</directory> <directory>vendor/gammamatrix/playground-cms/tests/Feature</directory> <directory>vendor/gammamatrix/playground-cms-resource/tests/Feature</directory> <directory>vendor/gammamatrix/playground-login-blade/tests/Feature</directory> <directory>vendor/gammamatrix/playground-http/tests/Feature</directory> <directory>vendor/gammamatrix/playground-site-blade/tests/Feature</directory> <directory>vendor/gammamatrix/playground-test/tests/Feature</directory> </testsuite> </testsuites> <source> <include> <directory>app</directory> <directory suffix=".php">vendor/gammamatrix/playground/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-auth/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-blade/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-admin/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-admin-resource/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-cms/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-cms-resource/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-login-blade/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-site-blade/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-http/src</directory> <directory suffix=".php">vendor/gammamatrix/playground-test/src</directory> </include> </source>
composer test
测试示例
phpunit --coverage-text --filter ModelTest
phpunit --coverage-text --filter RouteTest
phpunit --coverage-text --filter InstanceTest
phpunit --coverage-text --filter Policy
phpunit --coverage-text --filter Resource
phpunit --coverage-text --filter Login
PHPStan
在以下级别的测试
app/
config/
database/
resources/views/
tests/Feature/
tests/Unit/
- 以及Playground包。
composer analyse
编码标准
composer format
artisan about
Playground包在artisan about
命令中提供信息。
变更日志
请参阅CHANGELOG以获取有关最近更改的更多信息。
鸣谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。