Setting Laravel Blade variables from Inertia::render
#1348
-
I have a layout file that I'm using for my existing Laravel app and now I want to add Vue to one page of the app. I can pass this existing blade layout file to Inertia but it's complaining that the variables are undefined (e.g. Is there a way to render Inertia in the middle of a page rendered with Blade? The motivation is that I don't want to rebuild my header and footer in vue or to have to maintain two versions. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Did you pass the title variable? I didn't tested it right now but I think it should work. For the header and footer you could extract them in a blade component with its class. In the classes you could make all the queries you need and pass the props. |
Beta Was this translation helpful? Give feedback.
Did you pass the title variable? I didn't tested it right now but I think it should work.
For the header and footer you could extract them in a blade component with its class. In the classes you could make all the queries you need and pass the props.