I want to know the best practices for passing array in url and how can i define my routes for accepting that array in laravel 5 and pass it to the controller. Any Suggestions??
Let us take an example
URL - http://localhost/new/public/api/getaudit/
In this url, I want to pass array. Like: array('car','bike') Thanks
array=car&array=bikewill override one value with the other, so in$_GET['array']is just the valuebike, you needarray[]=car&array[]=bikehttp://localhost/new/public/api/getaudit/?array[]=car&array[]=bike/?array=car,bike$array = explode(',', $_GET['array'];