PHPackages                             saber13812002/persian-php-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. saber13812002/persian-php-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

saber13812002/persian-php-laravel
=================================

persian-php-laravel

1.4(4y ago)34MITPHPPHP ^7.1|^8.0

Since Apr 5Pushed 4y agoCompare

[ Source](https://github.com/saber13812002/persian-php-laravel)[ Packagist](https://packagist.org/packages/saber13812002/persian-php-laravel)[ Docs](https://github.com/atm-code/ar-php-laravel)[ RSS](/packages/saber13812002-persian-php-laravel/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

[![](https://camo.githubusercontent.com/8e699e4e473aab7b9ef600190bba6b7750f518a228e46e9ba556e858e5c84ec8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f7065727369616e2d706870253230666f722532304c61726176656c2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d736162657231333831323030322532467065727369616e2d7068702d6c61726176656c267061747465726e3d776967676c65267374796c653d7374796c655f32266465736372697074696f6e3d777261707065722b666f722b5065727369616e2d5048502b4c6962726172792b746f2b7573652b776974682b6c61726176656c266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d36303026686569676874733d363530)](https://camo.githubusercontent.com/8e699e4e473aab7b9ef600190bba6b7750f518a228e46e9ba556e858e5c84ec8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f7065727369616e2d706870253230666f722532304c61726176656c2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d736162657231333831323030322532467065727369616e2d7068702d6c61726176656c267061747465726e3d776967676c65267374796c653d7374796c655f32266465736372697074696f6e3d777261707065722b666f722b5065727369616e2d5048502b4c6962726172792b746f2b7573652b776974682b6c61726176656c266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d36303026686569676874733d363530)

[![](https://camo.githubusercontent.com/612c7f463992a574bac15bce522c825d775d28844fda51b939a6d82073b937a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736162657231333831323030322f7065727369616e2d7068702d6c61726176656c)](https://packagist.org/packages/saber13812002/persian-php-laravel)[![](https://camo.githubusercontent.com/cd391eb341c648fd8ba82937f8bfcf8002510216654700b8b660462545fb9c4c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f736162657231333831323030322f7065727369616e2d7068702d6c61726176656c)](https://travis-ci.com/saber13812002/persian-php-laravel)[![](https://camo.githubusercontent.com/8e165ea523a7180e5bc505c6e1f48f310eaeb47fd37ea4a2140d5366bda8428b/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3335343835333630392f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/354853609?branch=main)[![](https://camo.githubusercontent.com/ffed3daf071e9dc2436b28882f9e997b1cd68b586466fbc8c8bbcd6cf8f7d5e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736162657231333831323030322f7065727369616e2d7068702d6c61726176656c)](https://packagist.org/packages/saber13812002/persian-php-laravel)[![](https://camo.githubusercontent.com/c07dfe9e145df5f75ba1dfca9e84ecaafce64070481f74a33d31a2a70ddc5756/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f736162657231333831323030322f7065727369616e2d7068702d6c61726176656c)](https://github.com/saber13812002/persian-php-laravel)

laravel package for the persian-PHP Project
===========================================

[](#laravel-package-for-the-persian-php-project)

this is just a wrapper to use with laravel for the persian-PHP Library, for more details checkout [khaled-alshamaa: persian-php](https://github.com/khaled-alshamaa/persian-php)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require saber13812002/persian-php-laravel
```

Available functions
-------------------

[](#available-functions)

#### Spell Numbers in the Arabic Idiom

[](#spell-numbers-in-the-arabic-idiom)

```
dump(ArPhpLaravel::int2str(123)); // مئة و ثلاثة و عشرون
dump(ArPhpLaravel::str2int('مئة و ثلاثة و عشرون')); // 123
```

#### English-Arabic Transliteration

[](#english-arabic-transliteration)

```
dump(ArPhpLaravel::en2ar('google')); // غوغل
dump(ArPhpLaravel::ar2en('خالِد الشَمعَة')); // Khalid Ash-Sham'ah
```

#### Arabic Gender Guesser

[](#arabic-gender-guesser)

Check the Gender

```
dump(ArPhpLaravel::isFemale('محمد')); // false
```

get the gender as string

```
dump(ArPhpLaravel::guessGender('محمد')); // Male
```

#### Parse any Arabic textual datetime description into timestamp

[](#parse-any-arabic-textual-datetime-description-into-timestamp)

```
dump(ArPhpLaravel::strtotime('الخميس القادم', time(), 'l dS F Y'))); // Thursday 13th May 2021
```

#### Arabic Sentiment Analysis

[](#arabic-sentiment-analysis)

```
dump(ArPhpLaravel::arSentiment(TEXT));
```

#### Arabic Text Standardize

[](#arabic-text-standardize)

```
dump(ArPhpLaravel::standard(TEXT));
```

#### Arabic Auto Summarize

[](#arabic-auto-summarize)

```
dump(ArPhpLaravel::arSummary(TEXT));
```

#### Convert Money to string

[](#convert-money-to-string)

```
dump(ArPhpLaravel::money2str(123, 'SAR', 'ar')); // مئة و ثلاثة و عشرون ريالا
dump(ArPhpLaravel::money2str(123, 'SAR', 'en')); // 123 Riyal
dump(ArPhpLaravel::money2str(123, 'EGP', 'ar')); // مئة و ثلاثة و عشرون جنيها
```

#### Spell Numbers in the Arabic Idiom

[](#spell-numbers-in-the-arabic-idiom-1)

```
dump(ArPhpLaravel::int2indic(123)); // ١٢٣
```

#### Arabic Glyphs to Render Arabic Text

[](#arabic-glyphs-to-render-arabic-text)

```
dump(ArPhpLaravel::utf8Glyphs(1229));
```

### Search with Eloquent and query Builder

[](#search-with-eloquent-and-query-builder)

Using search for arabic letters with Eloquent Builder

```
Model::searchAr('content','فلسطين')->get();
```

you can use the same with Query Builder:

```
DB::table('table_name')->searchAr('content','فلسطين')->get();
```

you can set the search mode `OR` (default) or `AND`

```
DB::table('table_name')->searchAr('content','فلسطين','OR')->get();
```

and it will find result for any of the words:

> فلسطينيون فلسطيني فلسطينية فلسطينيتين فلسطينيين فلسطينيان فلسطينيات فلسطينيوا

you can also sort the results by using:

```
DB::table('table_name')->orderAr('content','فلسطين')->get();
```

Used By
-------

[](#used-by)

This project is used by the following companies:

- [arabkey - عرب كيبورد](https://arabkey.site)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Khaled Alshamaa](https://github.com/khaled-alshamaa)
- [All Contributors](../../contributors)

Todo
----

[](#todo)

- write more tests
- add more functions from the main package
- add helpers for the Facade

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~40 days

Total

6

Last Release

1744d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.4PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3294604?v=4)[Saber tabatabaee yazdi](/maintainers/saber13812002)[@saber13812002](https://github.com/saber13812002)

---

Top Contributors

[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (42 commits)")[![saber13812002](https://avatars.githubusercontent.com/u/3294604?v=4)](https://github.com/saber13812002 "saber13812002 (5 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (1 commits)")

---

Tags

ar-php-laravelatm-code

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saber13812002-persian-php-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/saber13812002-persian-php-laravel/health.svg)](https://phpackages.com/packages/saber13812002-persian-php-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M267](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M991](/packages/illuminate-pagination)[illuminate/redis

The Illuminate Redis package.

8314.4M362](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

224.5M132](/packages/illuminate-cookie)[still-code/ar-php-laravel

ar-php-laravel

397.5k](/packages/still-code-ar-php-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
