From 81585c1e96b169f811a967a8072487378f7c02f9 Mon Sep 17 00:00:00 2001 From: Liao San Kai Date: Sat, 3 Dec 2022 23:06:36 +0800 Subject: [PATCH] Update README.md Supplementary information about use tab with non-ascii char as title. --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 41688dc..b1ea96d 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,25 @@ class User extends Resource The first tab in every `Tabs` instance will be auto-selected. +**Note**: If use non-ascii char as title(ex: chinese), you should define the tab name with ascii char to avoid get empty slug string. +```php +public function fields(Request $request) +{ + return [ + Tabs::make('Some Title', [ + Tab::make('頁籤一', [ + Number::make('Balance', 'balance'), + Number::make('Total', 'total'), + ])->name('tab-1'), + + Tab::make('頁籤二', [ + Number::make('Paid To Date', 'paid_to_date') + ])->name('tab-2'), + ]), + ]; +} +``` + ### Relationship Tabs ![image](https://user-images.githubusercontent.com/3426944/50060715-a3b8d680-0197-11e9-8f98-1cac8cf3fd83.png)