fast-excel
fast-excel copied to clipboard
custom output for boolean columns export
I have boolean columns in my db, when I export I want to replace boolean with custom words like YES/NO
Is that possible?
Yes. You can do something like this
(new FastExcel(User::all()))->export('users.csv', function ($user) {
return [
'my column name' => $user->myBooleanVariable ? 'YES' : 'NO',
// Then the rest of your columns
];
});