mahdimajidzadeh/persianalize

Laravel package for normalize Persian text
2,835 9
Install
composer require mahdimajidzadeh/persianalize
Latest Version:0.1
PHP:~5.6
License:MIT
Last Updated:Nov 17, 2017
Links: GitHub  ·  Packagist
Maintainer: MahdiMajidzadeh

Persianalize

Persianalize use to normalize Persian input and remove arabic and other similar characters.

Install

Via Composer

$ composer require mahdimajidzadeh/persianalize

If you do not run Laravel 5.5 (or higher), then add the service provider in config/app.php:

MahdiMajidzadeh\Persianalize\PersianalizeServiceProvider:class

If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.

Usage

$result = Persian::numbers_fa('123٤٥٦'); // return ۱۲۳۴۵۶

$result = Persian::numbers_en('۱۲۳٤٥٦'); // return 123456

$result = Persian::text('ي ڲ ڬ'); // return ی گ ک

$result = Persian::persian($text); // make texts and numbers Persian 

$result = Persian::standard($text); // make texts Persian and numbers English 

Change log

Please see CHANGELOG for more information on what has changed recently.

Related Packages

opilo/farsi

Farsi Tools for Dates and Numbers and Strings (with Laravel Validation Support)

3,254 31
mdaliyan/farsi-request

A (Laravel Request Transformer) that replaces Arabic characters with Farsi chara...

869 11
majid/shamsi

laravel 4.2 package for shamsi date

43 14
bigsinoos/j-eloquent

Convert eloquent date attributes to jalali (Persian) dates on the fly. (support...

4,690 21

Version History

Version Released PHP Laravel License
0.1 ~5.6 ~5.1 MIT