Monday, April 10, 2017

Laravel how can make a query string but not like url path?

I trying to make an url query string with laravel but this method:

url()->to('categories', ['id' => 1, 'name' => 'cars']);

returns me:

http://localhost/categories/1/cars

but i need this:

http://localhost/categories?id=1&name=cars



via John Stamoutsos

Advertisement