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

This package is auto-updated.

Last update: 2021-10-12 00:36:12 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.