company_name); $client = Client::whereRaw("REGEXP_REPLACE(name, '[^A-Za-z0-9]', '') = ?", [$cleanedInput]) ->first(); if ($client) { // Update exact match $client->update([ 'sql_acc_code' => $customer->sql_acc_code, ]); } else { $this->info("Skipped Match Found for: {$customer->company_name}"); } } DB::commit(); } catch (\Exception $e) { DB::rollBack(); Log::error('Error project linkage : '.$e->getMessage(), [ 'trace' => $e->getTraceAsString(), ]); return 1; } } }