naif / world-clock
A Laravel Nova card to display world clocks
Installs: 17 534
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: >=7.1.0
This package is not auto-updated.
Last update: 2024-11-07 11:58:22 UTC
README
A Laravel Nova card to display world clock
Installation:
You can install the package in to a Laravel app that uses Nova via composer:
composer require naif/world-clock
Usage:
Add the below to app/Providers/NovaServiceProvder.php
namespace App\Providers; [...] use Naif\WorldClock\WorldClock; class NovaServiceProvider extends NovaApplicationServiceProvider { [...] public function card() { return [ (new WorldClock()) ->timezones([ 'Asia/Tokyo', 'Asia/Dubai', 'America/new_york', 'America/los_angeles', ]) ->timeFormat('h:i') //Optional time format default is: 'h:i:s' ->updatePeriod(1000) //Optional to set updating time period in millisecond default is 1000 ms = 1 second ]; } [...] }
Credits
Support:
https://www.linkedin.com/in/naif
License:
The MIT License (MIT). Please see License File for more information.