add cloud scripts

This commit is contained in:
Andras Bacsai 2024-05-08 12:29:36 +02:00
parent 331cad276e
commit 2ea27acdde

View File

@ -0,0 +1,11 @@
$handle = fopen("/tmp/export.csv", "w");
App\Models\Team::chunk(100, function ($teams) use ($handle) {
foreach ($teams as $team) {
if ($team->subscription->stripe_invoice_paid == true) {
foreach ($team->members as $member) {
fputcsv($handle, [$member->email, $member->name], ",");
}
}
}
});
fclose($handle);