https://github.com/chris-ware/nova-clock-card
A clock card for Laravel Nova
https://github.com/chris-ware/nova-clock-card
Last synced: 3 months ago
JSON representation
A clock card for Laravel Nova
- Host: GitHub
- URL: https://github.com/chris-ware/nova-clock-card
- Owner: chris-ware
- Created: 2018-08-25T14:38:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-09T19:46:53.000Z (over 7 years ago)
- Last Synced: 2026-01-02T11:16:58.676Z (6 months ago)
- Language: Vue
- Size: 27.3 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nova Clock Card
A clock card for Laravel Nova
[](https://packagist.org/packages/chris-ware/nova-clock-card)
[](ttps://packagist.org/packages/chris-ware/nova-clock-card)
[](ttps://packagist.org/packages/chris-ware/nova-clock-card)
[](https://github.styleci.io/repos/146102919)
## Installation
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
```bash
composer require chris-ware/nova-clock-card
```
Next, you must register the card with Nova. This is typically done in the `cards` method of the `NovaServiceProvider`.
```php
// in app/Providers/NovaServiceProvder.php
// ...
public function cards()
{
return [
// ...
new \ChrisWare\NovaClockCard\NovaClockCard,
];
}
```
## Customization
You are able to customize date & time formats, locale and timezone and display type. By default locale and timezone is taken from `config/app.php`. The default display type is `text`. The `analogue` display type is also available.
```php
// in app/Providers/NovaServiceProvder.php
// ...
public function cards()
{
return [
// ...
(new \ChrisWare\NovaClockCard\NovaClockCard)
->locale('sk')
->dateFormat('dddd, Do MMMM YYYY')
->timeFormat('LTS')
->timezone('UTC')
->display('analogue'),
];
}
```
## Information
This card will pull in your set timezone from `config/app.php` and use it to display the date and time.