Jun 17, 2022
0
Level 1
How to have a text nova field readonly and with a default value fetched from DB
I have this Laravel nova code where there is a readonly field. But this field should be populated with a value that already exists on a database table.
Do you know how to use Eloquent inside the Text nova field to get that database value?
new Panel('Settings', [
...JSON::make('Settings', [
Text::make('Site Locale', 'siteLocale')->readonly(),
])->data
]),
Please or to participate in this conversation.