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, ...).
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',
],
];
This package takes advantage of Laravel Package Discovery, therefore there is no configuration to be made our your application.
composer test
MIT License. Please see LICENSE for more information.