atm-code/ar-php-laravel
Composer 安装命令:
composer require atm-code/ar-php-laravel
包简介
ar-php-laravel
关键字:
README 文档
README
laravel package for the Ar-PHP Project
this is just a wrapper to use with laravel for the Ar-PHP Library, for more details checkout khaled-alshamaa: ar-php
Installation
You can install the package via composer:
composer require still-code/ar-php-laravel
Available functions
Spell Numbers in the Arabic Idiom
dump(ArPhpLaravel::int2str(123)); // مئة و ثلاثة و عشرون dump(ArPhpLaravel::str2int('مئة و ثلاثة و عشرون')); // 123
English-Arabic Transliteration
dump(ArPhpLaravel::en2ar('google')); // غوغل dump(ArPhpLaravel::ar2en('خالِد الشَمعَة')); // Khalid Ash-Sham'ah
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
dump(ArPhpLaravel::strtotime('الخميس القادم', time(), 'l dS F Y')); // Thursday 13th May 2021
Arabic Sentiment Analysis
dump(ArPhpLaravel::arSentiment(TEXT));
Arabic Text Standardize
dump(ArPhpLaravel::standard(TEXT));
Arabic Auto Summarize
dump(ArPhpLaravel::arSummary(TEXT));
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
dump(ArPhpLaravel::int2indic(123)); // ١٢٣
Arabic Glyphs to Render Arabic Text
dump(ArPhpLaravel::utf8Glyphs(1229));
translate arabic text to english, useful for slug generating
dump(ArPhpLaravel::translate('اهلا بالكل')); // Ahla Balkl
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();
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
Todo
- write more tests
- add more functions from the main package
- add helpers for the Facade
License
The MIT License (MIT). Please see License File for more information.
atm-code/ar-php-laravel 适用场景与选型建议
atm-code/ar-php-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.09k 次下载、GitHub Stars 达 39, 最近一次更新时间为 2021 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「arabic」 「arabic-sentiment」 「arabic-numbers」 「arabic-glyphs」 「arabic-calendar」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 atm-code/ar-php-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 atm-code/ar-php-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 atm-code/ar-php-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Set of functionalities enable Arabic website developers to serve professional search, present and process Arabic content in PHP
ar-php-laravel
Convert numbers to Arabic words
Laravel MPdf : Easily generate PDF files with arabic support
Package to convert English number to Nepali number and Nepali number to English number.
Alfabank REST API integration
统计信息
- 总下载量: 7.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 40
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-05