Running multiple projects Laravel Herd on subdomains?
I have a Laravel project i'm running locally with Laravel Herd at. The local URL for example would be mywebsite.test.
I have a Flarum forum i want to run as a subdomain at community.mywebsite.test. Can Laravel Herd support this locally?
I need it because I'm trying to wire up some SSO so my users only have to login on the main site and not double login again on the Flarum forum but i believe i can't unless the resulting cookie is on the same domain.
I was trying to share the session between two apps and Chrome was not setting the cookie because the domain was .test. I didn't want to change the TLD as it is not recommended in Herd.
Then I came across this post and boom!!.
I linked the apps to app1.example.test and app2.example.test and change the session domain to .example.test and it all worked.
All subdomains point to the same project, I have internal language routing. I was looking for exactly the same thing, thanks for this tip: herd link de.mysite.test did the trick.
@Pyerro What did your directory setup look like? I think I need something similar to what you had.
Main main laravel application should be on: platform.mysite.test
Another site which should have access to the main project codebase (all within the platform.mysite.test) should be on: website.mysite.test.
So within my Herd (sites) directory, do I have two directories, the main laravel application inside platform.mysite.test and an empty one inside website.mysite.test.