0
我有这个网址:如何从网址获取参数并查看?
http://test.dev/search?publishing_types[]=Selling&priceFrom=0&priceTo=300000&areaFrom=0&areaTo=300000&floors[]=2&yearFrom=1900&yearTo=2017
现在我想考虑的是这样的:
<input type="checkbox" class="preventUncheck" name="publishing_types[]" id="toggle-on{{ $index }}" value="{{ $prop_type }}" @if (publishg_types== Selling) {!! "checked" !!} @endif >
<input type="checkbox" class="preventUncheck" name="publishing_types[]" id="toggle-on{{ $index }}" value="{{ $prop_type }}" @if (publishg_types== Reng) {!! "checked" !!} @endif >
所以我想是从URL如果publishing_types == Selling
和/或publishing_types == Rent
在复选框检查检查复选框
如果你把它传递给你的方法,你可以简单地使用'$ request ['NAME']'否则你必须通过它 – DestinatioN
在我看来这个错误,然后未定义的变量:请求 – uzhas
使用'request()'-helper函数与'request('publishing_types')' – Sebastian