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

Ajvanho's avatar
Level 14

Vue prop from Laravel blade

I think in earliest version of L/V is worked, but now props in undefined...

// this is a blade file
<app :foo="{{ auth()->check() }}"></app>
0 likes
8 replies
vincent15000's avatar

How do you retrieve your props in VueJS ? I don't think that props is undefined ... what is undefined ? the foo variable ? something else ?

vincent15000's avatar

@Ajvanho I really don't understand why you say that. In your VueJS component, you have to declare your props to be able to retrieve them.

<template>
</template>

<script>
	export default {
	  props: {
	  	...
	  },

	  data() {
	  	return {
			...
	  	}
	  },
	  computed: {
		...
	  },

       methods: {
	   }
	}
</script>

<style scoped>
</style>

Please or to participate in this conversation.