Replies: 1 comment 1 reply
-
Repeater::make(__('Retail Purchase Items'), 'retailPurchaseItems')
- ->asHasMany()
+ ->asHasMany(RetailPurchaseItem::class)
->repeatables([
Repeaters\RetailPurchaseItem::make(),
]), |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cable8mm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Under Laravel 12 + Nova 5
As a non-native speaker, I have been using the
__()
method for localization.However, I haven't found a way to change the display name of a
Repeater
field.In this case, Retail Purchase Items corresponds to the
retail_purchase_items
table name, so I expected the following approach to work:However, this code doesn't work because the
Repeater
class interprets판매아이템
as a class name instead of referring toRetailPurchaseItem
.I believe the
Repeater
class should have a resource argument, similar to other fields, but it currently does not.For example, the following
BelongsTo
field works correctly with localization:How can I apply localization to the
Repeater
field correctly? Any insights would be greatly appreciated!Beta Was this translation helpful? Give feedback.
All reactions