I know toAarray()
, but it just con only transfer the outmost layer to array type, it was still object inside the result.
l searched a way that modify the config of database.php, add this config 'fetch' => PDO::FETCH_OBJ
but it doesn't work. l found laravel use DB::setFetchMode(PDO::FETCH_ASSOC);
to set the mode, but seemingly cannot found after 5.5 version.
Is there any other better way to transfer DB faced's result to array?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire