How to Get Query Strings Value in Laravel?

By Hardik Savani | March 30, 2016 | Category : Laravel

If you want to get Query string value then you can get using Request Facade OR Input Facade in larave 5. But if you was working native PHP then we can get $_GET method.

we can get query string parameters in laravel 6, laravel 7 and laravel 8 application.

Let's see bellow examples

In following example you can easily get parameter value.

URL Example:

In above query string, you want to get query string value for example id and name. you can get through bellow example.

Route Example:

Route::get('wall', '[email protected]');

Controller Example:

public function wall(Request $request)


/* returns Ony Id value */

$id = $request->input('id');

/* returns array of entire input query value */

$query = $request->all();

/* OR */

/* returns Ony Id value */

$id = Input::get('id');

/* returns array of entire input query value */

$query = Input::all();


Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.