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
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Integrations\Whmcs\Support;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class SyncedLegacyIds
|
||||
{
|
||||
/**
|
||||
* @return array<int|string, int> legacy ids already present locally, as a lookup set
|
||||
*/
|
||||
public static function of(string $table, bool $requireCustomer = false): array
|
||||
{
|
||||
$query = DB::table($table)->whereNotNull('legacy_id');
|
||||
if ($requireCustomer) {
|
||||
$query->whereNotNull('customer_id');
|
||||
}
|
||||
|
||||
return $query->pluck('legacy_id')->flip()->all();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user