How to get query string value in laravel

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.

Answers 2
  • Get query string value in laravel controller using get method

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

    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')
    
    0

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

  • Back to code snippet queries related laravel