Laravel Homestead: Failed to mount component: template or render function not defined error - laravel-5

This problem is driving me mad, I have been researching and have read about the standalone and runtime version of Vue. As far as I can tell Laravel 5.4/homestead ships with the standalone version as default.
The Vue development tools in chrome show the example component so I think that part is working correctly, just cannot render the template.
I am relatively new to Vue and npm been stuck in the past with jQuery, firstly where in laravel can I check/set I want the stand alone version of Vue? If it is not that problem does any one have any ideas?
Thanks for help

VueJS supports two ways of building apps like you said.
Load all necessary scripts within your page via script tags (not combined .vue files).
Compile and bundle all your files with Gulp, Browserify, Webpack or other tools.
Can you explain what you did so far. I guess you don't compile everything down.

The comment by peaceman was the solution, I had multiple calls to elixir, I condensed down to one and it worked straight away. Thanks everyone for your help.

Related

Laravel assets folder and bootstrap

I have started my first laravel project after I got a recommendation to use a framework.
I have started watching some tutorials and am trying to follow along, but in all the tutorials there is an assets folder inside resources with for example a _variables file. I don't have this folder, I guess it because I am using laravel version 7x and the tutorials are using an older version? I also thought bootstrap was provided with laravel, but it does not work. Have I done anything wrong or does everything seem right? I have followed a tutorial step-by-step from the start and used npm install & npm run dev, but the css file it creates is empty. I have also tried to start over with a new project, but the same happens!
Any help is appreciated!
Are you already run composer require laravel/ui? Laravel 7 has frontend scaffolding. You can read the documentation's about frontend scaffolding here https://laravel.com/docs/7.x/frontend.
Hope this help.

Laravel 6 and Bootstrap

I am new to Laravel.
When I install Laravel 6 a lot of the things that install by default in Laravel 5.8 are not evident i.e. bootstrap, vue, jquery.
I see this is package.json file.
I did not find anything that explains this and wondering if anyone has some guidance that might enlighten me.
Example:
I was trying to use bootstrap as shown in the video I was watching and found missing resources/sass files ap.scss and .variables.scss. ap.scss was empty and .variables.scss was absent. I did find them buried elsewhere in the installation; however, bootstrap did not work and any attempts I made to install bootstrap and other missing pieces wound up breaking the framework (probably something I did.)
In the meantime I am staying with a Version 5 distribution of Laravel.
Laravel decoupled what front end tech you use by default in 6.0
You can review the documentation here.
https://laravel.com/docs/6.x/frontend

how to convert es6 codes into code that IE can rendered

i am currently working on project that contains a lot of ES codes.when i run the project on IE it shows that there are lots of errors does not support in IE. Is there any solution?
Why you add laravel in tags? It's javascript question. But nvm, up to you.
The solution is you should use javascript polyfill. So, the ES code can be converted to the code that browser understand. Since you're using Laravel, you can use Laravel Mix to transpile your code.
use polyfill.js in your script
https://cdnjs.cloudflare.com/ajax/libs/js-polyfills/0.1.42/polyfill.js
Use polyfill to make it compatible with IE
npm install react-app-polyfill
check more on this link
https://github.com/facebook/create-react-app/tree/master/packages/react-app-polyfill

How to install php-v8js on window

Now, i using vuejs and laravel. when i see view page source (Ctrl+U) but have not html code.I went to find in google.And found need to use Server side rendering
(I learned form https://medium.com/js-dojo/server-side-rendering-with-laravel-vue-js-2-5-6afedd64aa90) But problem is "Class 'V8Js' not found"
Someone can help ?
sorry I don't speak English that well
The problem is, that V8JS is a PHP library, that is not shipped by default and you have to compile it by yourself. You can learn more about it and how to install it on it's GitHub page. Follow the installation instructions for your local machine operating system and you should be good to go. If you would like to deploy your app to your hosting provider, first you have to make sure that your host has this PHP extension compiled and enabled. Hopefully this helps you :)

Laravel QR code scanner

I'm interested in adding QR Scanner to my Laravel project, I found one that suits me it's called gruhn/vue-qrcode-reader there is also a written tutorial how to install it, but I just don't know where to add those codes or files. I've installed everything the problem is that I just don't know what to edit and how.
This is a late response: but for anyone who comes across this like me...
gruhn/vue-qrcode-reader was created using VueJS a Javascript Framework. Since you use Laravel: VueJS already comes preinstalled with Laravel depending on the version you use. You should also have Npm in order to use the npm run watch (the watcher).
Follow the installation steps found at their GitHub and then Simply create a new VueJS component and paste the code found in GitHub: gruhn/vue-qrcode-reader: while having a little understanding you can easily integrate this with Laravel by mounting the component where you wish to have the scanner in your project and viola it should work as advertised.
I hope this helps a bit.
You should try this one laravel package:-
https://github.com/werneckbh/laravel-qr-code
It would be best for you, because there are only few steps and that are too easy.

Resources