diff --git a/other/scripts/get-subs.php b/other/scripts/get-subs.php new file mode 100644 index 000000000..3a23fc073 --- /dev/null +++ b/other/scripts/get-subs.php @@ -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);