MohmmedAshraf / laravel-fix-arabic-numbers

Laravel - Auto Fix Arabic Numbers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel - Auto Fix Arabic Numbers

This package allows you to auto fix Arabic numbers form inputs.

Installation

This package can be used in Laravel 5.4 and up.

You can install the package via composer:

composer require outhebox/laravel-fix-arabic-numbers

Usage

Laravel

In app/Http/Kernel.php, register the middleware:

protected $middleware = [
    //...
    \OutheBox\FixArabicNumbers\Http\Middleware\FixArabicNumbers::class,
]

Lumen

In bootstrap/app.php, register the middleware:

$app->middleware([
    \OutheBox\FixArabicNumbers\Http\Middleware\FixArabicNumbers::class,
]);

Extending

If you need to EXTEND the existing FixArabicNumbers middleware note that:

  • Your FixArabicNumbers middleware needs to extend the OutheBox\FixArabicNumbers\Http\Middleware\FixArabicNumbers middleware
  • Add the fields you want to except form the middle ware to
    /**
     * The attributes that should not be trimmed.
     *
     * @var array
     */
    protected $except = [
        //
    ];

License

The MIT License (MIT). Please see License File for more information.

About

Laravel - Auto Fix Arabic Numbers

License:MIT License


Languages

Language:PHP 100.0%