A thinkphp package that can easily generate CSV files from Eloquent models.
installcomposer require whereof/think-csvBasic Usage $users = User::select(); // All users
$csvExporter = new \whereof\think\csv\Export();
$csvExporter->build($users, ['email', 'name'])->download();Create CSV$exporter - > build ($modelcollection, $fields) requires three parameters. The first is the model (a collection of models), the s ...
Posted by THESiUS on Mon, 22 Nov 2021 12:52:44 -0800