How to get query string value in laravel

Updated at 30-Aug-2021, By samar

How to get query string value in laravel

Hello everyone, in this post we will look at how to solve "How to get query string value in laravel" in programming.

You can get the query string value in laravel in different way. You can use Input::get("keyword") and $request->get('keyword') method to display query string value.
  • Get query string value in laravel controller using get method

    $query = $request->get('keyword');
    

    You have to pass query string name with keyword to the url on which you want to add query string.

  • Get query string value in laravel blade

    request()->get('keyword')
    

    You can get the query string value in laravel blade file using request() method.

Back to code snippet queries related laravel