Using a Laravel REST API with a NextJs App

  Рет қаралды 63,082

Laravel

Laravel

2 жыл бұрын

Building ergodnc streams:
• Building a Laravel App...
Installing Tailwind CSS with Next.js:
tailwindcss.com/docs/guides/n...
ergodnc on GitHub:
github.com/themsaid/ergodnc
This NextJS App:
github.com/themsaid/ergodnc-n...
Taylor's NextJS Example:
github.com/taylorotwell/next-...

Пікірлер: 51
@OnlyJavascript
@OnlyJavascript 2 жыл бұрын
perfect timing man...I needed it.
@themsaid
@themsaid 2 жыл бұрын
Nice :)
@davidadokuru8139
@davidadokuru8139 2 жыл бұрын
Mohamed you have no idea how much this helped me Thank you 😭😁
@themsaid
@themsaid 2 жыл бұрын
Glad it did 🙂
@shofada
@shofada 2 жыл бұрын
Well done. But to be “fair” 😀, kindly do one with NuxtJS. Pleeease!
@themsaid
@themsaid 2 жыл бұрын
I might :D
@kevariable
@kevariable 2 жыл бұрын
I think next js is better one haha
@void_77777
@void_77777 2 жыл бұрын
Okk Next
@nadeemahmed7947
@nadeemahmed7947 2 жыл бұрын
Thank you, can you explain bit more about hosting backend and frontend app or make a separate tutorial for that?
@parthlathigara
@parthlathigara 2 жыл бұрын
Nice tutorial, btw which theme and fonts do you use?
2 жыл бұрын
I really like that you did this, I want to try some new front end to replace livewire.
@mansourmansour5841
@mansourmansour5841 2 жыл бұрын
y u want to replace livewire?
2 жыл бұрын
@@mansourmansour5841 is super slow with big datasets, this is not elixir phoenix
@NotBeHaris
@NotBeHaris 2 жыл бұрын
Thanks for sharing great informtion
@behzodjon
@behzodjon 2 жыл бұрын
Great video!
@scotttresor
@scotttresor 2 жыл бұрын
Great Tutorial, but can you explain in detail nuxt js and in to regard job in laravel
@vanessaccnobre
@vanessaccnobre 2 жыл бұрын
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?
@themsaid
@themsaid 2 жыл бұрын
Using Vercel or Netlify for hosting the NextJS app is the most common approach yes.
@dicksonkibe7602
@dicksonkibe7602 2 жыл бұрын
Great Tutorial, on a side note, I really like you PhpStorm settings. Which theme do you use?
@dhiaben20
@dhiaben20 2 жыл бұрын
Looks like Night owl
@themsaid
@themsaid 2 жыл бұрын
It's called Night Owl
@daleryanaldover6545
@daleryanaldover6545 2 жыл бұрын
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
@themsaid
@themsaid 2 жыл бұрын
Nice! Glad you find my content useful :)
@SayaWRT
@SayaWRT Жыл бұрын
which article. can you provide the link?
@mityukov
@mityukov 2 жыл бұрын
Not about Next, but about react: how come expressions like {errors.lenght && ..some.jsx...} evaluate in jsx being returned, instead of a Boolean?
@TheRolldone
@TheRolldone Жыл бұрын
so where the token store it? as encrypt by nextjs to be cookie or store to local storage?
@AksoomHussain7866
@AksoomHussain7866 2 жыл бұрын
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 ?
@MuhamedAlfaifi
@MuhamedAlfaifi 2 жыл бұрын
no dummy data anymore, very nice
@madtin
@madtin Жыл бұрын
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...
@user-tt6nc6mo7k
@user-tt6nc6mo7k 2 жыл бұрын
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?
@pranayaryal
@pranayaryal 6 ай бұрын
One part missing in axios instance is add withXSRFToken: true This caused lot of headache
@7ala9at
@7ala9at 2 жыл бұрын
thank u for this turorial, please any solve problem user unauthenticated in console log , sorry for my english 😀
@tanmaypatra4896
@tanmaypatra4896 Жыл бұрын
Hello Bro! Should I need to run Laravel and NextJs in different ports? Or Laravel will manage internally ports?
@markanthonybautista1325
@markanthonybautista1325 2 жыл бұрын
You do the same fetching using nuxt js. Thank you!
@robinbertilsson5328
@robinbertilsson5328 2 жыл бұрын
I find this tutorial very helpful, however - in a "real" setup, you would probably utilize a HOC, in order to render the "loading" state, for e.g. pages with an auth middleware. Or authenticate server side, to prevent flickering. Do you have any plans for tutorials for either a HOC, or Authentication on the server? Cheers.
@piusijachi2763
@piusijachi2763 2 жыл бұрын
What is hoc
@yourjhay
@yourjhay 2 жыл бұрын
@@piusijachi2763 higher order component
@gamerpotato2463
@gamerpotato2463 Жыл бұрын
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?
@dennishalili8090
@dennishalili8090 Жыл бұрын
Hello, why user variable is undefined? I've got the details for logged on user, but it can't assign to user variable
@M7mdCC
@M7mdCC 2 жыл бұрын
What happen if authenticated user try to access register page?
@TariqSajid
@TariqSajid 2 жыл бұрын
how to return these headers using cors config Access-Control-Allow-Headers Access-Control-Allow-Methods
@GergelyCsermely
@GergelyCsermely 2 жыл бұрын
Thanks
@themsaid
@themsaid 2 жыл бұрын
You're welcome :)
@nabeelyousafpasha
@nabeelyousafpasha 2 жыл бұрын
Respect from Pakistan 🇵🇰 Hot topic much needed
@IBeThieving
@IBeThieving 2 жыл бұрын
Why are is allowed_origins set to all? Surely this should be set to the domain? This could be a security risk
@lindor94
@lindor94 2 жыл бұрын
This is great stuff. Any suggestions how to deploy this on a LAMP server?
@seyidtakele8158
@seyidtakele8158 2 жыл бұрын
May i know any reason why you favor react over vue ?
@themsaid
@themsaid 2 жыл бұрын
My personal favorite is actually Vue with the options API. But I'm open to trying different tools and technologies all the time :)
@matteusan
@matteusan 2 жыл бұрын
YOOOOOOOOOOOOOOOOOO
Using a Laravel REST API with a NuxtJs App
15:43
Laravel
Рет қаралды 36 М.
Can we use Laravel as a Next.js alternative?
20:13
Andrew Schmelyun
Рет қаралды 16 М.
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 36 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 29 МЛН
Laravel SPA Authentication - setup and common mistakes
16:55
Next.js Server Actions...  5 awesome things you can do
7:51
Beyond Fireship
Рет қаралды 261 М.
Laravel Breeze API & NextJS SPA Authentication - Breeze Next Demo
6:21
Program With Gio
Рет қаралды 12 М.
You should just choose Laravel
13:23
Josh Cirre
Рет қаралды 29 М.
Laravel SPA Auth different domains
10:51
cdruc
Рет қаралды 8 М.
What in the world is a Facade?
3:31
Laravel
Рет қаралды 7 М.
the most important Next.js features to learn (in 8 minutes)
8:26
Web Dev Cody
Рет қаралды 33 М.
Laravel Sanctum SPA Auth Overview
13:34
cdruc
Рет қаралды 8 М.
NextJS and Laravel Can Be Friends
23:54
Laravel
Рет қаралды 19 М.
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН