RFFRED
2 months ago
367
4
Laravel

pass variables to @include

Posted 2 months ago by RFFRED

Hi,

I want to pass a variable to a template but I keep getting an error I can not fix

@include('mytemplate', ['var1' => '123'])

mytemplate

{{$var1}}

I get the error

[Vue warn]: Property or method "$var1" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

(found in <Root>)

I am not sure how to ix this as I have not started to use any vue code at all

Please sign in or create an account to participate in this conversation.