gecche / laravel-multidomain

A Laravel extension for using a laravel application on a multi domain setting
MIT License
838 stars 105 forks source link

using with Laravel Valet in local developement #82

Closed aurawindsurfing closed 2 years ago

aurawindsurfing commented 2 years ago

Hi @gecche and thanks for brilliant package!

I wonder how would one use this package with Laravel Valet. Valet handles all domain names without issue but with different tld such as store.test, samplestore.test etc.

When I use the package I need to use actual domains the app will work with in production such as store.com, samplestore.com

What will be your solution to that, please? Should the domain name be matched but without the .tld or with override for local developement?

Thanks!

gecche commented 2 years ago

Hi, thanks :)

Maybe I don't understand properly the question: you have to use store.com and samplestore.com in your local environment?

Or what?

Cheers

Giacomo

aurawindsurfing commented 2 years ago

Yes, but obviously I need to configure it for store.test and samplestore.test to work properly so all the configs will be named incorrectly for production then.

My idea was to have domains without the TLD's so the config files can work both in production and developement.

Maybe I'm missing something?

gecche commented 2 years ago

Hi,

If I understood properly, nope, you cannot use only a part of the name for reaching both domains. The mapping is one to one. I think that maybe a manual solution is to create 4 distinct domains and then do symbolic links if the files and/or folder are the same

Cheers

Giacomo

aurawindsurfing commented 2 years ago

Thanks for the time and advice!