Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Laravel ship with Vue? (SPA vs MVC)

I am a little confused as to why the Laravel framework ships with Vue.js.

My understanding is that Laravel is a traditional MVC framework, while Vue would be used for a SPA; these are both different application architectures, so how can they be used together?

I am currently trying to figure out whether my app is more suited to the traditional vs SPA styles of development and this is something that I am struggling to get my head around.

like image 829
Elliott Rhys Avatar asked Feb 28 '17 14:02

Elliott Rhys


People also ask

Does Laravel support SPA?

With Laravel, you can easily build either a SPA or MPA or both of them in one project!

Does Laravel use Vue?

In older versions of Laravel, Vue was set up automatically with every new installation. However, in newer versions you have to set it up yourself. Luckily, the laravel/ui package provides an easy way to set up Vue in your Laravel application.

What is VUE JS and Laravel?

Laravel is PHP's fastest-growing Framework with its ease of use, scalability, and flexibility. VueJS is the fastest growing Front end Library in the Javascript community. Laravel is providing VueJS support out of the box. So let us get up and running with the Laravel VueJS tutorial.


1 Answers

Using a SPA with an MVC is a common approach as it allows full server side logic to be expressed in the app, and a responsive, application-like user interface on the front end. Often, that involves using the MVC stack to manage the DB and generate JSON responses, while letting the entire UI live in the SPA.

like image 95
Jim Deville Avatar answered Sep 19 '22 15:09

Jim Deville