Get 2024 Templates Mega Bundle!19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets
Get for 99$

How to install vue on Metronic Laravel Starterkit


Where should I put:

window.Vue = require('vue');

I added at the bottom of resources/mix/plugins.js


// Vue.js - The Progressive JavaScript Framework
'node_modules/vue/dist/vue.global.prod.js',

but where should I register window.Vue

window.Vue = require('vue'); where should I put it?

Thank you


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi Carlos,

Thank you for reaching out to us.

There are a few ways how you can combine Laravel with Vue.

You can find one of the possible integration in the post below.
https://devs.keenthemes.com/question/laravel-9-vue-with-vite-integration-metronic-v816

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hello, i’m using the laravel starterkit 8.1.6 as you know it doesn’t use vite, i want to know where to register window.Vue = require(‘vue’);



Hi Carlos,

It is a global Vue instance that will be available on every page, you can put this code in any of your Js files.

You can try to follow steps in the guide below:
https://techsolutionstuff.com/post/how-to-install-vue-3-in-laravel-9-step-by-step

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(