interaction-design-foundation / nova-worldclock-card
一个用于显示世界时钟的 Laravel Nova 卡片
3.2.1
2024-05-29 12:33 UTC
Requires
- php: ^8.1
- ext-json: *
- laravel/nova: ^4.20
Requires (Dev)
- interaction-design-foundation/coding-standard: ^0.2.0
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.5 || ^11.0
- vimeo/psalm: ^5.22
README
一个用于显示世界时钟的 Laravel Nova 卡片。
安装
您可以通过 composer 将此包安装到使用 Nova 的 Laravel 应用程序中
composer require interaction-design-foundation/nova-worldclock-card
用法
基本用法
use InteractionDesignFoundation\WorldClockCard\WorldClock; public function cards() { return [ (new WorldClock()) ->timezones([ 'Asia/Dubai', 'America/New_York', 'Europe/Kiev', ]), ]; }
高级用法
use InteractionDesignFoundation\WorldClockCard\WorldClock; public function cards() { return [ (new WorldClock()) ->timezones([ 'Asia/Dubai', 'America/New_York', 'Europe/Kiev', ]) ->timeFormat('h:i') // Optional, time format. Default is: 'h:i' ->updatePeriod(1000) // Optional, to set updating time period in millisecond. ->nightRange(22, 6) // Optional, to set range of night hours. Default is [19; 6). ->hideContinents() // Optional, hide continents from timezone-names. ->timezoneDescriptions([ // Optional, add text description to timezones. 'Asia/Dubai' => 'Yuto, Hana', 'America/New_York' => 'Mark', 'Europe/Kiev' => 'Slava, Ukraine', ]), ]; }
变更日志
请参阅 发布记录 了解最近更改的信息。
贡献
请参阅 CONTRIBUTING 了解详细信息。
许可
MIT 许可证 (MIT)。请参阅 许可文件 了解更多信息。