0👍
Instead of encapsulating your desired columns in an array
public function collection()
{
return data::select(['username', 'password', 'email', 'phone'])->get();
}
Try changing it into this
public function collection()
{
return data::select('username', 'password', 'email', 'phone')->get();
}
Source:stackexchange.com