add cloud scripts
This commit is contained in:
parent
331cad276e
commit
2ea27acdde
11
other/scripts/get-subs.php
Normal file
11
other/scripts/get-subs.php
Normal 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);
|
Loading…
Reference in New Issue
Block a user