robiiinos / laravel-time
此包已被废弃且不再维护。未建议替代包。
在 Laravel API 中注册 '/time' 端点。
v1.1.2
2021-06-11 23:46 UTC
Requires
- php: ^7.4|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.19
- orchestra/testbench: ^6.18
- phpunit/phpunit: 9.4.*
- vimeo/psalm: ^4.7
This package is auto-updated.
Last update: 2021-10-12 00:36:12 UTC
README
在 Laravel API 中注册 /time 端点。
用例
- 监控端点。
- 与其他应用程序同步您的服务器(用于交易应用程序的时序安全性等)。
安装
您可以通过 composer 安装此包
composer require robiiinos/laravel-time
您可以使用以下命令发布配置文件
php artisan vendor:publish --provider="Robiiinos\LaravelTime\LaravelTimeServiceProvider" --tag="config"
这是配置文件的内容
return [ /* |-------------------------------------------------------------------------- | Laravel Time Route Prefix |-------------------------------------------------------------------------- | | This prefix will be assigned to every Laravel Time route, giving you | the chance to set your own prefix or change the existing prefix. | */ 'prefix' => 'api', /* |-------------------------------------------------------------------------- | Laravel Time Route Middleware |-------------------------------------------------------------------------- | | These middleware will be assigned to every Laravel Time route, giving you | the chance to add your own middleware to this list or change any of | the existing middleware. Or, you can simply stick with this list. | */ 'middleware' => [ 'api', ], ];
用法
此包利用 Laravel 包发现,因此您的应用程序无需进行配置。
测试
composer test
致谢
许可证
MIT 许可证。有关更多信息,请参阅 LICENSE。