I wanted to have the result with only the values not with the table column name in Laravel 4.2. For example,
$recs = DB::table(\'table_name\') ->s
Reference
Try $recs->flatten()->all()
$recs->flatten()->all()
Update
Since your $recs looks like an array from your error. Try converting to collection. I hope this will work on v4.2
$recs
collection
$recsCollection = new \Illuminate\Database\Eloquent\Collection($recs); $recsCollection->flatten()->all();