我使用 Yii2 表单,提交后我的 URL 如下所示:
http://example.com/recommendations/index?RecommendationSearch%5Bname%5D=&RecommendationSearch%5Bstatus_id%5D=&RecommendationSearch%5Btype%5D=0&RecommendationSearch%5Bcreated_at%5D=&sort=created_at
您可能看起来每个参数都包含表单名称RecommendationSearch
。如何RecommendationSearch
从参数中删除它以获取 URL url,如下所示:
http://example.com/recommendations/?name=&status_id=&type=0&created_at=&sort=created_at