When I download the csv:
54 is displayed instead of 00054. I'm using the next code:
$table = PldUsuario::all();
$output='';
foreach ($table as $row) {
$output.= implode(",",$row->toArray());
$output.= "
";
}
$headers = array(
'Content-Type' => 'text/csv',
'Content-Disposition' => 'attachment; filename="UsersPld.csv"',
);
return Response::make(rtrim($output, "
"), 200, $headers);
In my table in mysql displayed 00054.