robiiinos / laravel-time
This package is abandoned and no longer maintained.
No replacement package was suggested.
Register a '/time' endpoint to your Laravel API.
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
Register a /time
endpoint to your Laravel API.
Use case:
- Endpoint for monitoring.
- Synchronize other applications with your server (for timing security in trading applications, ...).
Installation
You can install the package via composer:
composer require robiiinos/laravel-time
You can publish the config file with:
php artisan vendor:publish --provider="Robiiinos\LaravelTime\LaravelTimeServiceProvider" --tag="config"
This is the content of the config file:
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', ], ];
Usage
This package takes advantage of Laravel Package Discovery, therefore there is no configuration to be made our your application.
Testing
composer test
Credits
License
MIT License. Please see LICENSE for more information.