2017-06-14 69 views
0

如何刪除特定的查詢字符串參數形式redirect() - >意向('/')是否存在? 例如重定向() - >意(「/」)將重定向到:如何從Laravel redirect()中刪除specifc查詢字符串參數 - > intended('/')?

https://www.exampleDomain.com?specificParameter=true&anotherparameter=123 

而且我想重定向之前擺脫「specificParameter =真」,所以它會被重定向到這個代替:

https://www.exampleDomain.com?anotherparameter=123 

我正在使用Laravel 5.3。 在此先感謝

回答

0

使用PHP的parse_url功能:http://php.net/manual/en/function.parse-url.php

然後你就可以抓住你特別需要的組件和創建正確的重定向URL。

+0

謝謝,我想知道是否有任何命令像「沒有」或那種性質的刪除查詢字符串,如果存在?看起來我需要手動分析和刪除查詢字符串。 – Mehdi