Search by

fbpkg / laravel-support

farzadblack

Common support utilities for Laravel applications.

Package info

github.com/fbpkg/laravel-support

pkg:composer/fbpkg/laravel-support

Statistics

Installs: 7

Dependents: 2

Suggesters: 0

Stars: 1

Open Issues: 0

v0.3.0 2026-09-24 08:55 UTC

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.