add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Services;
class PhoneFormatterService
{
public function formatPhoneNumber(string $number): ?string
{
$digits = preg_replace('/\D/', '', $number);
if (strlen($digits) === 10) {
return sprintf(
'%s-%s-%s',
substr($digits, 0, 3),
substr($digits, 3, 3),
substr($digits, 6)
);
}
return null;
}
}