Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ParameterBag could not be converted to string laravel 5.5

This my Code:

public function storeQuery(Request $request)
{            
    $q = new Query;

     //query table  
    //input lines
    $qr = $q->save(); //Getting Error here

    return view('caller.loader');

}

Here is Errors:

Object of class Symfony\Component\HttpFoundation\ParameterBag could not be converted to string

I could not get it.

like image 503
Sayandeep Majumdar Avatar asked Nov 28 '22 22:11

Sayandeep Majumdar


1 Answers

You are probably doing something like $request->query

$request->query is an object of type ParameterBag which contains the Query Params for GET Requests.

You should rather use $request->get('query') in these circumstances

like image 103
user3425867 Avatar answered Dec 10 '22 07:12

user3425867