Hi, do you know where to learn more about Vue.js and Laravel?
I've found some nice tutorials here:
http://learninglaravel.net/topics/vuejs
But there is no tutorial about how to use Vue.js with Laravel Blade together. I don't want to use VueJS to generate a list. It's not SEO friendly. Rendering a list on server-side using Blade is better (in my humble opinion)
For example, if I want to create an upvote and downvote button (using Vue) for my posts (generated by Blade). How can I do that?
I believe there are some lessons on laracasts about this - link.
Matt Stauffer wrote a really good starter guide on the Tighten Blog about getting started with elixr and Vue - link
I would recommend using elixir and gulp to process a JavaScript file and include that in your blade layout and then you would just use blade as normal. Then you can just use Vue to target the elements inside of the view.
TJ
Building Sparkle ✨ for Laravel | Echo Labs | Curology
Are you trying to put Blade inside your Vue component, like inside the Browserify .vue file? I don't think that is possible. Generally you don't use Javascript libraries a lot where SEO is crucial. I don't know the exact situation, but can't you attach the vue component to every item in the list? You can make directives so you do something like
@foreach ($items as $item)
<li vue-this>$item->text</li>
@endforeach
Then you can add behaviour when people do whatever with that list item. I don't think that intervenes much with SEO. But again, I would simply step down Vue on the SEO crucial pages and rely more on Vanilla.
Chris Blackwell
Put that cookie down!
You can tell Blade to ignore the syntax, and so only VueJS will trigger it. Example:
@{{ vue-variable}}