Laravel 8 Single Page Application (SPA) with Vue JS

Cerwyn Cahyono
The Startup
Published in
5 min readJan 31, 2021

--

Photo by Domenico Loia on Unsplash

Laravel is a great framework! We all know it. It offers a full stack development that enables us to build a frontend and backend website in one place. So we can deliver/build web projects in no time with quality and security inside. But that’s not it. There are so many things we can explore and leverage more power in Laravel. For example, I’ve written a lot of Vue JS component that we can embed it into our Laravel pages so that we can have a dynamic UI for our users. Interesting right? But the next thing we need to explore is, can we build a Single Page Application (SPA) inside our Laravel project? Of course, why not!

Before we start, why do we need a SPA for our project? Well, SPA gives our users a better experience. It’s fast, no reloads needed, even users can access the website without the internet! And the list goes on. But of course, it has some cons that you might reconsider before use it. Either you’re building a SPA or MPA (Multi-Page Application) you should ensure that it fits with your needs/requirements. But after all, Laravel by default enables us to build an MPA right? So I think It’s time for us to explore how to build SPA into our Laravel project. Let’s go!

Content Overview

  • Our Goals
  • Laravel and Vue JS Installation

--

--

Cerwyn Cahyono
The Startup

PHP/Backend Engineer at Undercurrent Capital Pte Ltd — Data Science Enthusiast