Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • 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:


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(