Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

robiiinos/laravel-time

Repository files navigation

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.

About

Register a '/time' endpoint to your Laravel API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages