I have simply followed Laravel documentation for setting up Vue.js
When the build is ready, add app.js from the public folder to your blade.php page’s footer
If you are getting an error saying the components not found, it means your script is executing before the document is ready
Make sure you have added app.js script at the end of the page
Adding new component (similar to ‘example’ component given with Laravel):
Components are one of the most powerful features of Vue. They help you extend basic HTML elements to encapsulate reusable code. At a high level, components are custom elements that Vue’s compiler attaches behavior to. In some cases, they may also appear as a native HTML element extended with the special is attribute.
Create a new component in resources/components called Greeting.vue
Add your bootstrap element inside template element
Create an instance of ‘greeting’ component in app.js
Middleware provides convenient mechanism for HTTP requests entering your application. For example, Laravel includes a middleware that verifies the user of your application is authenticated. If the user is not authenticated, the middleware will redirect the user to the login screen. However, if the user is authenticated, the middleware will allow the request to proceed further into the application.