Using a Laravel REST API with a NextJs App

preview_player
Показать описание
Building ergodnc streams:

ergodnc on GitHub:

This NextJS App:

Taylor's NextJS Example:
Рекомендации по теме
Комментарии
Автор

Thank you, can you explain bit more about hosting backend and frontend app or make a separate tutorial for that?

nadeemahmed
Автор

Mohamed you have no idea how much this helped me

Thank you 😭😁

davidadokuru
Автор

Well done. But to be “fair” 😀, kindly do one with NuxtJS. Pleeease!

shofada
Автор

Nice tutorial, btw which theme and fonts do you use?

parthlathigara
Автор

I really like that you did this, I want to try some new front end to replace livewire.

Автор

Great Tutorial, but can you explain in detail nuxt js and in to regard job in laravel

scotttresor
Автор

Not about Next, but about react: how come expressions like {errors.lenght && ..some.jsx...} evaluate in jsx being returned, instead of a Boolean?

mityukov
Автор

is it possible to use Laravel as headless CMS to bypass CORS for same origin issue to distribute the API on tenant mode or different domain distribution ?

AksoomHussain
Автор

so where the token store it? as encrypt by nextjs to be cookie or store to local storage?

TheRolldone
Автор

I get a "unable to verify the first certificate" error from my nextjs app if I try to use SSG or SSR. However, if I use CSR it works fine. How did you get yours to work with your valet provided certificates?

ttncmok
Автор

Hello Bro! Should I need to run Laravel and NextJs in different ports? Or Laravel will manage internally ports?

tanmaypatra
Автор

I read your article about external front end with laravel backend a few months back and it guided me in building a desktop app that connects to laravel api via session, the cookies are sent from backend to front end which is used to persist the user session. I also got a deep dive to Laravel authentication and implemented a login auth from the desktop app that authenticates using the database from backend, which is kinda confusing to setup at first. Anyway gotta try nextjs soon

daleryanaldover
Автор

What happen if authenticated user try to access register page?

MmdCC
Автор

thank u for this turorial, please any solve problem user unauthenticated in console log, sorry for my english 😀

alaat
Автор

I woke up pondering this approach and this tutorial was exactly the introduction I needed to assess feasibility, thank you so much! I'm curious about production deployment options. The Laravel blog has an article regarding Forge, but if I were to use Laravel Vapor for the backend, would I have to use Vercel (or similar, independently from Vapor) to deploy the NextJs app?

vanessaccnobre
Автор

How one would avoid calling /user when the user is not logged in? It returns 401 unauthenticated but the call is being made for no reason... Cookie is always set even after logging out...

madtin
Автор

Great Tutorial, on a side note, I really like you PhpStorm settings. Which theme do you use?

dicksonkibe
Автор

Hello, why user variable is undefined? I've got the details for logged on user, but it can't assign to user variable

dennishalili
Автор

I use this approach in a template, and it doesn't work. The useAuth method only runs once so the page is stuck at loading. I also did this in a clean project and it worked fine, because it runs multiple times. Anyone knows how why useAuth only runs once for my case?

gamerpotato
Автор

You do the same fetching using nuxt js. Thank you!

markanthonybautista