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

devondahon's avatar

Which strategy to connect two Nuxt to Laravel API?

What strategy should I better use to connect (signing, registering users...) two different Nuxt frontends, one for clients and one for admins, to my Laravel API ? All can be under the same top-level domain, so I plan to use Sanctum.

On Nuxt side, I will probably use @sidebase/nuxt-auth.

  • Should I use one web guard or two guards: admin-api and client-api?
  • Should I use scopes?
  • Should I use two middlewares for two route groups checking the request origin: www.mywebsite.com or admin.mywebsite.com?
0 likes
0 replies

Please or to participate in this conversation.