feat(portal): lead module, WHMCS sync report/contacts/mapping, service lifecycle email templates
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
3c7710f1de
commit
a443ec3bf6
@@ -7,8 +7,15 @@ use Illuminate\Support\LazyCollection;
|
||||
|
||||
class ClientExtractor
|
||||
{
|
||||
public function extract(): LazyCollection
|
||||
public function extract(bool $missingOnly = false): LazyCollection
|
||||
{
|
||||
return DB::connection('whmcs')->table('tblclients')->orderBy('id')->cursor();
|
||||
$rows = DB::connection('whmcs')->table('tblclients')->orderBy('id')->cursor();
|
||||
if (! $missingOnly) {
|
||||
return $rows;
|
||||
}
|
||||
|
||||
$uuids = DB::table('customers')->pluck('uuid')->flip()->all();
|
||||
|
||||
return $rows->reject(fn ($row) => isset($uuids[$row->uuid]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user