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

vannian's avatar

Load values from vue file

I am passing from my controller two objects to the view: return Inertia::render( 'Client/ShowClient', [ 'client' => $client, 'contracts' => $contracts, ] );

And in the ShowClient.vue I have defined this in script setup: const props = defineProps({ client: { type: Object, }, contracts: { type: Object, } });

but in HTML when I load elements like this is not working:

0 likes
1 reply
manelgavalda's avatar
Level 50

In the docs they specify the props like this: defineProps({ client: Object, contracts: Object })

You shouldn't have the const props=

1 like

Please or to participate in this conversation.