Commit 817983ea by Aung Khant Kyaw

remove special character in phone numbers

parent b6500fa0
...@@ -45,4 +45,13 @@ class Phone ...@@ -45,4 +45,13 @@ class Phone
return $getAmount; return $getAmount;
} }
public static function cleanPhoneNo($phnumber)
{
$clearphone = str_replace(array(" ", "#", "'", ";", "-", "\""), "", $phnumber);
$phonenumber = $clearphone;
return $phonenumber;
}
} }
...@@ -34,7 +34,7 @@ class DataImport implements ToModel, WithBatchInserts, WithChunkReading ...@@ -34,7 +34,7 @@ class DataImport implements ToModel, WithBatchInserts, WithChunkReading
// } // }
return new Data([ return new Data([
'phone' => $row[0], 'phone' => Phone::cleanPhoneNo($row[0]),
'service' => $this->sname, 'service' => $this->sname,
'operator' => Phone::getOperator($row[0]), 'operator' => Phone::getOperator($row[0]),
'amount' => ((count($row) > 1) ? Phone::getAmount($row[1]) : 0), 'amount' => ((count($row) > 1) ? Phone::getAmount($row[1]) : 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment