Fancy a SPA in laravel? Yes, we all do! So here is the quick and easy way to get the wonder Vue.js sparking into life in laravel 8.
First a foremo...
For further actions, you may consider blocking this person and/or reporting abuse
Great article Graham,
there is room for improvement in your code. So instead of
you could use the invokable flag so you don't use the index
and then use this route:
it tells Laravel routing to respond to any route provided or nothing with the question mark "?" and responds with an invokable controller
Great tutorial my friend.
Hi, I got an error with this code, because Laravel on the RouteServiceProvider, while reading web.php to get our Route, it has already set up the namespace for us.
So, for this code at web.php:
need change to:
Thank you for the invoke parameters information.
Thank you, I'm always learning so I hope to help folks and in turn, learn myself, so I will differently try this way out!
As i do my friend, we are all learning, we progress by sharing knowledge :)
Hi there,
A merely minute ago I followed your steps to see a Vue component inside a Laravel app but...the following message appeared instead:
Exception
The Mix manifest does not exist. (View: /hello-laravel-vue3/resources/views/welcome.blade.php)
What's wrong?
Nice tutorial! Following you! ;)
SInce the error page which is showed tells us:
Missing Mix Manifest File
Did you forget to run npm install && npm run dev?
I run npm install && npm run dev. Then, this error happened during the installation of npm install&npm run dev:
up to date, audited 2064 packages in 2s
47 packages are looking for funding
run
npm fund
for detailsfound 0 vulnerabilities
78% module and chunk tree optimization ExtractTextPlugin/hello-laravel-vue3/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:1063
} eLse if ++complEted ===
^^
SyntaxError: Unexpected token 'if'
at hello-laravel-vue3/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:969:16
Hey , I cant replicate the error. It works out of the box for me. Is NPM and node upto date on your machine
Vue-template-compiler is not compatible with vue 3.
Use @vue/compiler-sfc . Ensure it is same version as vue
Hello Graham! Thanks for this great article.
I'm using Laravel's Sail. After I ran 'sail artisan serve', the server started, but I can't reach it on the browser (This site can't be reached).
Could you help me with this issue?
Thank you!
Sorry, Graham.
I was mixing concepts. I'll let my comment to help future "sail's" devs.
When using sail, it isn't necessary using 'artisan serve'. You just need to run 'sail npm run dev' after update vue/js files.
i have followed the exact steps event with fresh install of Laravel 8 but still shows error when run npm run dev command
dev-to-uploads.s3.amazonaws.com/i/...
Had the same issue, solved it by adding in the webpack.mix.js
a single additional
.vue();
I have added .vue(); but still nothing
can you run: npm run dev?
when i run npm it show that error i have attached the image as will
Sort of working solution, thanks.
Is it missing something? I would want to make sure its correct