|
|
@@ -48,9 +48,9 @@ class BadgeResource extends Resource
|
|
48
|
48
|
Translate::make()->schema(fn (string $locale) => [
|
|
49
|
49
|
TextInput::make('title')->required($locale == 'zh_TW')
|
|
50
|
50
|
->unique(
|
|
51
|
|
- table: Badge::class, // Your model class
|
|
52
|
|
- column: 'title', // The translatable JSON column
|
|
53
|
|
- ignoreRecord: true // Ignore current record on updates
|
|
|
51
|
+ table: 'badges',
|
|
|
52
|
+ column: 'title->' . $locale,
|
|
|
53
|
+ ignoreRecord: true
|
|
54
|
54
|
)
|
|
55
|
55
|
->maxLength(40)->label('徽章標題'),
|
|
56
|
56
|
])
|