Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

abdosarmini's avatar

Deploy Laravel Backend API, Admin Panel and SPA Front End On The Same Domain

Hi. I have a project where I want my backend API and the admin panel to be on Laravel. The admin panel will use blade templates. But I want my client frontend to be SPA like Svelte or something, and then connect it to the Laravel API. And I want them all to be on the same domain, for example: mydomain.com. What is the best approach? Either by using subdomains or different paths like /api , /admin. I am really confused, and I don't know how must I manage all of these.

0 likes
1 reply
jlrdw's avatar

Is this a mobile app only?

Normally an API you don't worry about a Front end, you have basic instructions on the API usage.

The developer using (getting the json, xml, or csv) handles how to deal with the data.

That is unless this is a mobile app which is different.

I believe Jeffrey has some videos that might help, but I don't have the links.

Edit:

One series is https://laracasts.com/series/build-mobile-apps-with-react-native-and-expo

See if any videos cover where deployment is.

Please or to participate in this conversation.