object of class stdclass could not be converted to string php laravel

Solutions on MaxInterview for object of class stdclass could not be converted to string php laravel by the best coders in the world

showing results for - "object of class stdclass could not be converted to string php laravel"
Silvia
04 Nov 2017
1/*
2$data is indeed an array, but it's made up of objects.
3
4Convert its content to array before creating it*/
5$data = array();
6foreach ($results as $result) {
7   $result->filed1 = 'some modification';
8   $result->filed2 = 'some modification2';
9   $data[] = (array)$result;  
10   #or first convert it and then change its properties using 
11   #an array syntax, it's up to you
12}
13Excel::create(....
14
queries leading to this page
php fatal error 3a uncaught error 3a object of class stdclass could not be converted to stringmiddleware saying object of class stdclass could not be converted to string illuminate 2fdatabase 2fconnection php 3a laravelobject of class could not be converted to string laravellaravel jobs object of class could not be converted to stringmiddleware saying object of class stdclass could not be converted to string 3a laravel 22object of class illuminate 5cdatabase 5celoquent 5cbuilder could not be converted to string whererecoverable fatal error 3a object of class stdclass could not be converted to string phplaravel object of class stdclass could not be converted to string 22 22message 22 3a 22object of class stdclass could not be converted to string 22 2c 22exception 22 3a 22error 22 2c 22file 22 3a 22 2f 2fvendor 2flaravel 2fframework 2fsrc 2filluminate 2fdatabase 2fconnection php 22 2cobject of class stdclass could not be converted to string laravel controllerobject of class datetime could not be converted to string laravelerror 3a object of class stdclass could not be converted to string in file 2fvendor 2flaravel 2fframework 2fsrc 2filluminate 2fdatabase 2fconnection php on line 603object of class stdclass could not be converted to string in php 5cphp recoverable fatal error 3a object of class stdclass could not be converted to string object of class could not be converted to string phplaravel collection object of type std class could not be convertedobject of class stdclass could not be converted to string laravel logobject of class stdclass could not be converted to string in file 2fvendor 2flaravel 2fframework 2fsrc 2filluminate 2fdatabase 2fconnection php on line 603error 3a object of class stdclass could not be converted to string in file vendor 2flaravel 2fframework 2fsrc 2filluminate 2fsupport 2fstr php on line 560php object of class stdclass could not be converted to stringobject of class stdclass could not be converted to int laravellaravel object of class stdclass could not be converted to stringobject of class stdclass could not be converted to string 2fvendor 2flaravel 2fframework 2fsrc 2filluminate 2fdatabase 2fconnection php object of class stdclass could not be converted to string in laravel middlewareobject of class stdclass could not be converted to string php laravelobject of class stdclass could not be converted to string laravel 22message 22 3a 22object of class stdclass could not be converted to string 22 2c 22exception 22 3a 22error 22 2c 22file 22 3a 22 2fusers 2fkingsley 2fprojects 2freward gateway 2fapi 2fvendor 2flaravel 2fframework 2fsrc 2filluminate 2fdatabase 2fconnection php 22 2cobject of class stdclass could not be converted to string php laravel