Getting Started
Requirements
- PHP 8.3+
- Laravel 13
- Node.js (for building assets)
- A local dev domain that supports subdomains, e.g. Laravel Herd with
*.yourapp.test
Install
bash
laravel new my-app --using=lianmaymesi/laravel-multidomain-starterConfigure your domain
Set APP_MAIN_DOMAIN in .env to your local dev domain:
sh
APP_MAIN_DOMAIN=yourapp.testEvery portal subdomain is derived from this value (see Config Reference):
yourapp.test— landingauth.yourapp.test— login, register, password reset, verificationaccount.yourapp.test— profile, security, data exportapp.yourapp.test— the main authenticated appbackoffice.yourapp.test— staff-only area
Point all of these at your app in Herd/Valet/your hosts file, then visit auth.yourapp.test/register to create an account.
Next steps
- Don't need separate subdomains? See Single vs Multi Domain.
- Want users to stay logged in across portals? See Cross-Subdomain SSO.
- Adding your own portal? See the make:subdomain command.
- Rebranding colors or the square "edge design" look? See Theming.
- Explore what each portal actually does: Auth, Account, Backoffice.