How can I handle subdomains with one laravel installation

前端 未结 7 2023
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 09:19

I am creating a laravel project for which I need one laravel installation and use its instance in sub-domain with separate database. And th

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 09:55

    If you want to handle this from database then check the host name from the http url and call the database connection from main table according to host name. e.g. (http://abc.maindomain.com, get the abc from url)

提交回复
热议问题