I'm trying to run a sql query and return all values into an array of the tables names...
This is what I have so far:
$vehiclemodeldata = DB::table('model')->where('model_id', $viewData['model_id'])->get();
$row = $vehiclemodeldata->row();
foreach ($row as $key => $value){
$viewData['vehiclemodeldata_'.$key]= $value;
}
What are your throughts?
EDIT
I've tried this it seems to bring it back in an array but I can't access the array for some reason.
$VehicleModel = DB::table('model')->where('model_id', $viewData['model_id'])->get();
Thanks