$freeproviders = \Illuminate\Support\Facades\Cache::rememberForever('freeemailproviders', function () {
return Text::splitLines(file_get_contents('https://gist.githubusercontent.com/drakodev/e85c1fd6d9ac8634786d6139e0066fa0/raw/1f345fa275fafda8196af754674fcf04d05b7fba/free-disposable-email-providers.txt'));
});
+
+
+ $emails = [];
+ foreach (Company::withoutGlobalScopes()->where('created_ok', '1')->get() as $company) {
+ $emails = array_merge($emails, $company->getEmails());
+ }
+
foreach (User::withoutGlobalScopes()->where('created_ok', '1')->where('enabled', '1')->get() as $user) {
- $email = trim(mb_strtolower($user->email));
+ $emails = array_merge($emails, $user->getEmails());
+ }
+
+
+ foreach ($emails as $email) {
$e = explode('@', $email);
if (count($e) < 2) {
continue;
$res = array_unique($res);
sort($res);
+ dd($res);
return $res;
}
}