【发布时间】:2021-08-31 23:11:35
【问题描述】:
我正在尝试获取对路由执行 POST/GET 请求的 url 的来源。例如:
Route::post('/do-something', somethingController@getWhoRequesting);
然后作为示例,在视图上我执行 ajax 或简单的表单发布到该路由,该路由来自 localhost:8888/my-web-view。如何获取谁在请求我的 /do-something 端点的 url?我期待getWhoRequesting(),但我得到了'/my-web-view'。
提前致谢
【问题讨论】:
标签: php laravel laravel-routing