Use Laravels Input class. http://laravel.com/docs/4.2/requests#basic-input
Input::get('key')
Hi iWader
I'm using laravel's input class. I tried editing my initial post but for some reason I can't update it. I'm doing the following.
I'm creating links with $_GET values in the $url as per below and not using HTML link() because I have html tags within the anchors and HTML link() echos it out as actual text instead of html.
<a href="search/{{$url}}"><span>{{$v}}</span></a>
When the link is clicked on it results in a url that has %2520.
P.S. I don't know what is up with the edit function on this forum but it's definitely broken.
I've gone and used urlencode() on my $_GET values when generating the links and used urldecode() when using the values in my code. Spaces have been replaced by + which I don't think our SEO is going to like but it's the only solution right now.
Laravel 5 or 4?
In Laravel 5, {{ }} escapes by default. {!! $url !!}
I had the same problem. The reason of the double encoding is the fact that I was redirecting to a url which ended with a /. Laravel redirects this route to a url without a slash, but performs the urlencoding twice.
So by removing the ending slash, I solved the problem.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community