php - 在 Laravel 5 中将变量从路由传递到 Controller

标签 php laravel controller routes laravel-5

有没有办法将 $_SERVER['REQUEST_URI'] 变量传递给 Laravel 5 中的 Controller ?

最佳答案

您可以立即访问 $_SERVER,或者使用更“laravelish”的方式以及正确的请求包装器:Request::server('REQUEST_URI')$request->getRequestUri()

关于php - 在 Laravel 5 中将变量从路由传递到 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33996202/

相关文章:

php - Laravel 至少有一个字段是有效的

mysql - 检查与您的 MariaDB 服务器版本相对应的手册,了解在 '>video_id=89' 附近使用的正确语法

grails - 在 grails 中的以下情况下,我将如何使用按钮?

c# - 将入站消息的等待延迟限制为每秒消息数

PHP fatal error : Allowed memory size of xxx bytes exhausted (tried to allocate XX bytes)

php - PDO:调用非对象上的成员函数 fetch()?

php - 如何从不同日期的数据中获取当月的数据?

apache - 使用 Laravel 5.1 安装 phpMyAdmin

angularjs - 指令未使用 controllerAs 和 bindToController 使用异步数据更新 View

php - jQuery Ajax 发送空数据