[Vuejs]-Missing data when exporting to excel using Laravel Maatwebsite

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();
}

Leave a comment