fbpkg / laravel-support
Common support utilities for Laravel applications.
v0.3.0
2026-09-24 08:55 UTC
Requires
- php: ^8.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-25 07:08:01 UTC
README
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.