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

yo81's avatar
Level 4

Frontend - Backend (admin - api)

hi I wanted a judgment on this structure that I had in mind to realize.

-Frontend with vue 3 domain: example.com

-Backend with laravel two domains on the same server domain: api.example.com domain: admin.example.com

I would make two folders in the controllers app / http / controllers / admin app / http / controllers / api

and I check the domain on the route

Route :: group (array ('prefix' => 'api', 'namespace' => 'api', 'domain' => 'api.example.com'), function () { // your routes });

Route :: group (array ('prefix' => 'admin', 'namespace' => 'admin', 'domain' => 'admin.example.com'), function () { // your routes });

-aws s3 storage files

in your experience, are there any complications with this structure?

Thanks a lot

0 likes
1 reply
yo81's avatar
Level 4

An other question Is could there be some problem with sanctum beetwen example.com and api.example.com ?

Thanks

Please or to participate in this conversation.