Level 5
Do I must use withMeta for all attributes ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
With the documentation, i don't understand how retrieve Resource attribute on my Vue file. https://nova.laravel.com/docs/3.0/customization/resource-tools.html#assets
I do this :
public function withModel(Model $model)
{
return $this->withMeta(['model' => $model]);
}
And I can use like this :
template>
<div>Banknotes Ihm ??
<p>{{model}}</p>
</div>
</template>
<script>
export default {
props: ['resourceName', 'resourceId', 'panel'],
mounted() {
console.log(this.panel.fields[0])
},
data() {
return {
model: this.panel.fields[0].model
}
}
}
</script>
If you have better solution :)
Please or to participate in this conversation.