国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

路由參數(shù)里包含斜杠時,如何使路由生效

redqd

問題描述

這里寫問題描述

當請求url是
{{base_url}}/devices/666888990/sendMqtt/greenhouse/control/shade-net/open
時,不能正確的解析topics=greenhouse/control/shade-net/open,而是返回404

Route::any('/devices/{device_id}/sendMqtt/{topics}', [app\controller\devices\IndexController::class, 'sendMqtt']);
128 3 0
3個回答

你為什么不愿意修改一下路由的傳參方式,或者你的參數(shù)應(yīng)該避免出現(xiàn)/,就像你用Windows系統(tǒng)需要避免文件名是 \一樣

  • 暫無評論
Route::any('/devices/{device_id}/sendMqtt/[{topics:.+}]', [app\controller\devices\IndexController::class, 'sendMqtt']);

這個webman路由文檔有例子,這樣寫

  • redqd 6天前

    謝謝,謝謝,確實可行

dj880

謝謝分享~

  • 暫無評論
??