Change prepeare $data['colnames'] from 'foreach' to 'Arr::pluck'