I have a backend written in PHP, frontend with Twig templates and Vue components. I'm trying to pass data from my PHP controller into my Vue component, and I'm really not sure how to do this.
Let's say I have this in my controller:
return $this->render('setting/setting.html.twig', [
'title' => 'Your Etsy Settings',
'tab' => 'Settings',
'sub_title' => 'integrated with etsy',
'message' => '',
'settingForm' => $form->createView(),
'storeId' => $store->getId()
]);
How can I access 'title' in my Vue component? Part of my template is Twig, and then I'm rendering my Vue components inside the Twig template.
<your-vue-component :title="{{ title }}">. (Sorry, I don't know Twig's syntax exactly, but that's the basic idea.)