How to generate route with query string parameter in Laravel 5?
In this post we will give you information about How to generate route with query string parameter in Laravel 5?. Hear we will give you detail about How to generate route with query string parameter in Laravel 5?And how to use it also give you demo for it if it is necessary.
Whenever you require to add query string parameter in link url, i mean in route then you generate link with query string parameter using Laravel 5 URL facade. most of new developer doing this way:
<a href="{{ URL::route('home') }}.'?id=1&test_id=2'">Test</a>
But you should do it that this way, bellow example you can see how it done.
<a href="{{ URL::route('home',['id'=>'2','test_id'=>'3']) }}">Test</a>
Hope this code and post will helped you for implement How to generate route with query string parameter in Laravel 5?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs