laravel-support maintained by fbpkg
Description
Common support utilities for Laravel applications.
Author
Last update
2026/09/24 10:55
(dev-main)
License
Downloads
3
fbpkg/laravel-support
Common support utilities for Laravel applications.
Requirements
- PHP 8.2 or higher
Installation
composer require fbpkg/laravel-support
Digits
Normalize Persian and Arabic-Indic digits to ASCII digits.
use Fbpkg\Support\Digits\Normalizer;
Normalizer::normalize('۱۲۳۴۵۶۷۸۹۰');
// 1234567890
Normalizer::normalize('١٢٣٤٥٦٧٨٩٠');
// 1234567890
Phone
Normalize Iranian mobile phone numbers to the international +98 format.
use Fbpkg\Support\Phone\Number;
Number::normalize('09121234567');
// +989121234567
Number::normalize('۰۹۱۲۱۲۳۴۵۶۷');
// +989121234567
Number::normalize('+989121234567');
// +989121234567
Invalid Iranian mobile numbers throw an InvalidArgumentException.
License
The MIT License (MIT). Please see the LICENSE file for more information.