richardkeep / nova-timenow
A Laravel Nova card to display the current time from different timezones in the world.
Installs: 43 472
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 2
Forks: 1
Open Issues: 3
Requires
- php: ^8.0
- laravel/nova: ^4.0
This package is auto-updated.
Last update: 2024-10-28 01:57:16 UTC
README
A Laravel Nova card to display the current time from different timezones in the world.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require richardkeep/nova-timenow
Next up, you must register the tool with Nova. This is typically done in the cards
method of the NovaServiceProvider
.
// in app/Providers/NovaServiceProvder.php // ... public function cards() { return [ // ... new \Richardkeep\NovaTimenow\NovaTimenow, ]; }
Customization
By default, the system's timezone and America\Mexico_City will be used as the list of timezones. To override this, please add more valid timezones.
public function cards() { return [ // ... (new \Richardkeep\NovaTimenow\NovaTimenow)->timezones([ 'Africa/Nairobi', 'America/Mexico_City', 'Australia/Sydney', 'Europe/Paris', 'Asia/Tokyo', ])->defaultTimezone('Africa/Nairobi'), ]; }
Usage
The card will be automatically displayed on the dashboard. You can now select the timezone from the dropdown list of registered timezones to view the current time in that region,