Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

domthomas-dev's avatar

Nova resource tool

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

0 likes
2 replies
domthomas-dev's avatar
domthomas-dev
OP
Best Answer
Level 5

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.