update email template
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Integrations\Whmcs\Writers;
|
||||
|
||||
use App\Integrations\Whmcs\DTOs\ClientData;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ClientWriter
|
||||
{
|
||||
/**
|
||||
* Upsert into `customers` keyed by `uuid` (WHMCS already assigns a uuid per client).
|
||||
*/
|
||||
public function write(ClientData $data): void
|
||||
{
|
||||
DB::table('customers')->updateOrInsert(
|
||||
['uuid' => $data->uuid],
|
||||
[
|
||||
'fullname' => $data->fullname,
|
||||
'company' => $data->company,
|
||||
'address' => $data->address,
|
||||
'state' => $data->state,
|
||||
'city' => $data->city,
|
||||
'saler' => $data->saler,
|
||||
'country' => $data->country,
|
||||
'phone' => $data->phone,
|
||||
'email' => $data->email,
|
||||
'password' => $data->password,
|
||||
'note' => $data->note,
|
||||
'credit' => $data->credit,
|
||||
'status' => $data->status,
|
||||
'email_marketing' => $data->emailMarketing,
|
||||
'created_at' => $data->createdAt,
|
||||
'updated_at' => $data->updatedAt,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user