Looking to hire Laravel developers? Try LaraJobs

laravel-time maintained by robiiinos

Description
Register a '/time' endpoint to your Laravel API.
Last update
2021/06/12 01:46 (dev-master)
License
Downloads
91

Comments
comments powered by Disqus

Laravel Time

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.