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

BernardoBF4's avatar

Passing props from Vue slot to Laravel component

I have this Vue component, called the-collapsible, and inside it I can have a slot and pass to my slot an image called image. In this specific case of my example, I have a Laravel component that should receive my image from the slot, but I simply can't make it work . So far I've tried:

:image="{{ image }}"
image="{{ image }}"
:image="image"
image="image"

and none worked, so I'd like to know what's the proper way to pass a prop from the the vue component to the slot (laravel component) in this case.

Example: somewhere inside blade

<the-collapsible child_key="item" :parents="product.accompaniment_categories" v-slot="{ image }">
		<x-card
              :image="image"
              :text="$product->title"
              :route="$product->route"
              disabled-badge="{{ $product->quantity > 0 ? false : 'Esgotado' }}"
              first-badge="{{ 'R$' . $product->price }}"
              image-mode="contain"
              second-badge="{{ $product->category->restaurant->configurations?->external ? 'Delivery' : false }}" 
              :description="$product->description"
         />
</the-collapsible>
0 likes
2 replies
tykus's avatar
tykus
Best Answer
Level 104

You cannot. Laravel has completed its work before Vue ever begins.

2 likes

Please or to participate in this conversation.