I was trying to export a query - the function in the controller was as below
class Export implements FromCollection
{
public function collection()
{
$data = DB::table('Providers')->get();
return $data;
}
}
but producing the error:
vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Cell\DefaultValueBinder.php
"Object of class stdClass could not be converted to string"