承接 alkoumi/laravel-arabic-numbers 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alkoumi/laravel-arabic-numbers

最新稳定版本:v1.1.3

Composer 安装命令:

composer require alkoumi/laravel-arabic-numbers

包简介

Laravel package to handel ANY thing 🥳 about our Amazing 💝 Arabic Numbers Functions { كل ما يهم محبي لارافيل واستخدام الأرقام العربية مثل تفقيط الأرقام والمبالغ المالية والعكس و عرض الأرقام بالعربية والعكس }

README 文档

README

Laravel package to handel ANY THING about our Amazing 💝 Arabic Numbers Functions { كل ما يهم محبي لارافيل واستخدام الأرقام العربية مثل تفقيط الأرقام والمبالغ المالية والعكس و عرض الأرقام بالعربية والعكس }

Packagist License Packagist Version GitHub release (latest by date) Total Downloads Packagist Stars

كل ما يهم محبي لارافيل واستخدام الأرقام العربية مثل تفقيط الأرقام والمبالغ المالية والعكس و عرض الأرقام بالعربية والعكس

Installation for all Laravel Versions 🥳

1- You can install the package via composer:

composer require alkoumi/laravel-arabic-numbers

2- You must register the service provider in your config/app.php file:

'providers' => [
    // ...
    Alkoumi\LaravelArabicNumbers\LaravelArabicNumbersServiceProvider::class,
];

3- You must register the Middleware in your App\Http\Kernel file:

protected $middleware = [
    // ...
    Alkoumi\LaravelArabicNumbers\Http\Middleware\ConvertArabicDigitsToEnlishMiddleware::class
];

Now any request have arabic indic [١،٢،٣،٤،٥،٦،٧،٨،٩،٠] Numbers will Translated 🥳 to [1,2,3,4,5,6,7,8,9,0]

Excepting Fields

If you want to except any field from transforming request, Just add the fields you want to except them in the Middleware ConvertArabicDigitsToEnlishMiddleware::class :

        /**
         * The fields that should not be Transformed.
         *
         * @var array
         */
        protected $except = [
            'password', 'password_confirmation' ,'numbers','count'
        ];

Usage

Arabic Numbers

تفقيط المبالغ المالية باللغة العربية الفصحى مثل 123 => { مئة و ثلاثة و عشرون ريالًا فقط لا غير }

You can simply get Tafqeet of The int Money amount directly in Arabic idioms

    use Alkoumi\LaravelArabicNumbers\Numbers;

    $number = 64.56;
    Numbers::TafqeetMoney($number); //It will Give SAR by default

    // RESULT {  أربعة و ستون ريالًا و ست و خمسون هللة فقط لا غير }


    [OR]


    $value = 64.56;
    Numbers::TafqeetMoney($value,'EGP'); //You can pass $currency as the second @param

    // RESULT {  أربعة و ستون جنيهًا و ست و خمسون قرش فقط لا غير }

تفقيط الأرقام باللغة العربية الفصحى مثل 64 => { أربعة و ستون }

You can simply get Tafqeet of The int Value directly in Arabic idioms

    use Alkoumi\LaravelArabicNumbers\Numbers;

    $number = 64;
    Numbers::TafqeetNumber($number);

    // RESULT {  أربعة و ستون }

إستخراج الأرقام من التفقيط باللغة العربية للأرقام وليس للمبالغ 😉 مثل { أربعة و ستون } => 64

You can simply Reverse Tafqeet in Arabic idioms to The int Number directly

    use Alkoumi\LaravelArabicNumbers\Numbers;

    $string = "أربع و ستون فاصلة ست و خمسون";
    Numbers::NumberFromString($number);

    // RESULT 64.56

عرض الأرقام العربية بدل الأرقام الإنجليزية والعكس حسب رغبة المستخدم 657 => ٦٥٧

You can simply Show Any Value in Arabic Digits Or English Digits

    use Alkoumi\LaravelArabicNumbers\Numbers;

    $number = 64; // integar value
    Numbers::ShowInArabicDigits($number);

    // RESULT "٦٤.٥٦"


    [OR]


    use Alkoumi\LaravelArabicNumbers\Numbers;

    $value = "٦٤.٥٦"; // Can be Any Value STRING or INTEGAR
    Numbers::ShowInEnglishDigits($value);

    // RESULT "64.56"


    [EVEN 🥳 Any Value]


    use Alkoumi\LaravelArabicNumbers\Numbers;

    $value = "تاريخ اليوم : 22-10-2020"; // Can be Any Mix Value STRING with INTEGAR
    Numbers::ShowInArabicDigits($value);

    // RESULT {تاريخ اليوم : ٢٢-١٠-٢٠٢٠}

Give Me 💗 Cup of ☕️ Coffee here https://patreon.com/mohammadelkoumi

统计信息

  • 总下载量: 18.94k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 72
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 72
  • Watchers: 1
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-29