+1
Did you sort it out?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am writing a custom nova card to display some basic infos of a ressource on detail view (for example created_at, updated_at, deeplink to the frontend of this ressource, etc.). How can I access model data for this?
I know, i could access "resource" property in vue (resource.fields), but the problem is, that I would have to go through all the fields to get the right one, since its an array, not a object.
Otherwise I would have to do something like so:
function getFieldValue(fieldName) {
for(fieldIndex in resource.fields) {
let field = resource.fields[fieldIndex];
if(field.name == fieldName) return field.value;
}
}
But this will not work, if I use Panels or if the tab-package.
Isn't there an easy way to just access the model-data in the Card-Class in php and then pass it to Vue with withMeta?
Please or to participate in this conversation.