I create REST api in Laravel, does it make sense to use route handler (api routes) in next.js
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
Hello, I am creating the REST API in laravel. Would it make sense to use the route handler structure in Next.js?
login.jsx => route handler will send request, route handler will send laravel request.
Does this structure make sense? Is it nonsense to use the rest api already created in laravel?
login.jsx => route handler will send request, route handler will send laravel request.
Does this structure make sense? Is it nonsense to use the rest api already created in laravel?
2 Replies
Southeastern blueberry bee
You're just adding an unnecessary step (in this case, the route handlers). I recommend consuming your laravel api directly from your frontend
Dwarf CrocodileOP
thank you 🙂