DEV Community

Discussion on: Create a SPA with Laravel and Nuxt

Collapse
 
leob profile image
leob • Edited

That's an impressive piece of work, a full Laravel/Nuxt integration! How did you get all of this 'magic' working? I'm planning to read your source code to understand how it works under the hood.

Searching for "laravel" and "nuxt" I saw that there were only a few Github projects dealing with this, that's a bit surprising since Laravel has a heavy 'bias' towards Vue.js and SSR (and hence Nuxt.js) seems a good fit for many Laravel projects (especially content-focused apps/websites).

I saw one other Laravel/Nuxt starter repo, but yours seems a bit more clean and lightweight.

Definitely want to try this out (another option would be to go for a pure Javascript approach, using node/express for the API/backend/server part rather than PHP/Laravel).

However the ease of development and the vibrant community are what attract me to a Laravel based solution (compared to for instance Django).

Collapse
 
skyrpex profile image
Cristian Pallarés

Thanks! I think you'll an easy time reading from the source: there isn't much code and part of it is documented using docblocks.

I also searched for a Laravel&Nuxt integration, but found none that fit my tastes. I expect your feedback on it soon! :)

The ease of development and the code quality is what attracts me to using Laravel as an API too. There are a few things I'd change from Laravel, but I still love it!

I'll create another tutorial about authorization using LaravelNuxt in the next weeks... maybe you'll be interested.

Collapse
 
leob profile image
leob • Edited

Great job ... what surprised me is that while Laravel "ships" with Vue.js you can hardly find anything about integrating Laravel with Nuxt, even though the two seem a natural combo. Your repo seems to be one of the very few solutions!

What I understood is that in fact you need Javascript on the server (node/express) to support SSR. So what you did (if I understood correctly) is run a separate node/express server and proxy requests between the node server and the Laravel server, right? And then you just code your app in Laravel (the API part) and Vue (the client part), no need to worry about the node/express part.

Sounds pretty nifty, I'll read your source code to understand the details.

Yes I would definitely be interested in your authorization tutorial with LaravelNuxt!