duanbamo0127 2018-07-26 10:15
浏览 47
已采纳

Laravel多变量子子域

Currently I have:

Route::domain('{subdomain}.alfa.example.com')->group(function () {

    Route::get('/tet', function ($subdomain) {

        dd($subdomain); 

    });
})

I want to be able to use a route that will respect the following criteria:

  • {variable}.alfa.example.com
  • {variable 1}. (...) .{variable N}.alfa.example.com
  • Variable is not known or defined.
  • N is also not defined and I can have as many dots as I can (as many sub sub domains as I can)

Before asking, I have tried to use ->where('subdomain', '(.*)'); but with no effect.

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 如何按照企业名字进行爬虫
      • ¥15 关于#单片机#的问题,如何解决?
      • ¥100 制作短链接和api接口的
      • ¥15 星河亮点sp9500测试指导
      • ¥15 dataframe 某列数据分列
      • ¥15 风扇导入fluent后仿真压力和速度数据卡在旋转域
      • ¥15 echarts中dataZoom报错
      • ¥15 求解答:《前端综合基础》作为一门课程的话,应该包含哪些内容?
      • ¥15 软件原型系统开发+实例测试
      • ¥50 C#上位机调试Win USB