【发布时间】:2016-05-01 09:45:10
【问题描述】:
这是我从 laravel 应用程序中搜索的视图..
{{ Form::open(array('method' => 'get', 'url' => 'search'))}}
<input type="text" name="location" >
<input type="text" name="query" >
<input type="submit" >
{{ Form::close() }}
当我输入一些内容并按 Enter 时,页面正在带我
那我的网址是这样的
myapp.com/search?query=abc&location=uk
如何编写路由以获取控制器内的 url 值? 请帮忙
【问题讨论】:
-
谢谢。我的网址就像
myapp.com/search?query=abc&location=uk -
只有当我有这样的
myapp.com/search/abc -
Imtiaz Pabel 添加的答案是正确的。你会得到准确的结果。
标签: php laravel url laravel-4.2