{"id":25952396,"url":"https://github.com/still-code/ar-php-laravel","last_synced_at":"2025-03-04T14:50:56.823Z","repository":{"id":44219048,"uuid":"354853609","full_name":"still-code/ar-php-laravel","owner":"still-code","description":"provides a set of tools that enable Arabic website developers to serve professional search, present and process Arabic content in laravel","archived":false,"fork":false,"pushed_at":"2024-04-02T18:35:35.000Z","size":190,"stargazers_count":31,"open_issues_count":0,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-03T19:35:41.574Z","etag":null,"topics":["ar-php","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/still-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"atmonshi"}},"created_at":"2021-04-05T14:00:57.000Z","updated_at":"2024-04-15T11:07:53.300Z","dependencies_parsed_at":"2024-03-04T16:10:16.166Z","dependency_job_id":"fadf72bb-6b5a-40b4-be4e-c7cf54db160f","html_url":"https://github.com/still-code/ar-php-laravel","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/still-code%2Far-php-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/still-code%2Far-php-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/still-code%2Far-php-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/still-code%2Far-php-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/still-code","download_url":"https://codeload.github.com/still-code/ar-php-laravel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239850429,"owners_count":19707351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ar-php","laravel","php"],"created_at":"2025-03-04T14:50:56.132Z","updated_at":"2025-03-04T14:50:56.812Z","avatar_url":"https://github.com/still-code.png","language":"PHP","funding_links":["https://github.com/sponsors/atmonshi"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://banners.beyondco.de/Laravel%20Ar-PHP.png?theme=light\u0026packageManager=composer+require\u0026packageName=still-code%2Far-php-laravel\u0026pattern=brickWall\u0026style=style_1\u0026description=Ar-PHP+wrapper+for+laravel\u0026md=1\u0026showWatermark=1\u0026fontSize=125px\u0026images=https%3A%2F%2Flaravel.com%2Fimg%2Flogomark.min.svg\" width=\"600\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/still-code/ar-php-laravel\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/still-code/ar-php-laravel\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/still-code/ar-php-laravel\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/still-code/ar-php-laravel\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/still-code/ar-php-laravel\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/still-code/ar-php-laravel\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/still-code/ar-php-laravel/actions?query=workflow%3AFix+PHP+code+style+issues+branch%3Amain\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/still-code/ar-php-laravel/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/still-code/ar-php-laravel/actions/workflows/fix-php-code-style-issues.yml\"\u003e\u003cimg src=\"https://github.com/still-code/ar-php-laravel/actions/workflows/fix-php-code-style-issues.yml/badge.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# laravel  package for the Ar-PHP Project\n\nthis is just a wrapper to use with laravel for the Ar-PHP Library, for more details checkout [khaled-alshamaa: ar-php](https://github.com/khaled-alshamaa/ar-php)\n## Installation\nYou can install the package via composer:\n```bash\ncomposer require still-code/ar-php-laravel\n```\n\n## Available functions\n#### Spell Numbers in the Arabic Idiom\n``` php\ndump(ArPhpLaravel::int2str(123)); // مئة و ثلاثة و عشرون\ndump(ArPhpLaravel::str2int('مئة و ثلاثة و عشرون')); // 123\n```\n\n#### English-Arabic Transliteration\n``` php\ndump(ArPhpLaravel::en2ar('google')); // غوغل\ndump(ArPhpLaravel::ar2en('خالِد الشَمعَة')); // Khalid Ash-Sham'ah\n```\n\n#### Arabic Gender Guesser\nCheck the Gender\n``` php\ndump(ArPhpLaravel::isFemale('محمد')); // false\n```\nget the gender as string\n``` php\ndump(ArPhpLaravel::guessGender('محمد')); // Male\n```\n\n#### Parse any Arabic textual datetime description into timestamp\n``` php\ndump(ArPhpLaravel::strtotime('الخميس القادم', time(), 'l dS F Y')); // Thursday 13th May 2021\n```\n\n#### Arabic Sentiment Analysis\n``` php\ndump(ArPhpLaravel::arSentiment(TEXT));\n```\n\n#### Arabic Text Standardize\n``` php\ndump(ArPhpLaravel::standard(TEXT));\n```\n\n#### Arabic Auto Summarize\n``` php\ndump(ArPhpLaravel::arSummary(TEXT));\n```\n\n#### Convert Money to string\n``` php\ndump(ArPhpLaravel::money2str(123, 'SAR', 'ar')); // مئة و ثلاثة و عشرون ريالا\ndump(ArPhpLaravel::money2str(123, 'SAR', 'en')); // 123 Riyal\ndump(ArPhpLaravel::money2str(123, 'EGP', 'ar')); // مئة و ثلاثة و عشرون جنيها\n```\n\n#### Spell Numbers in the Arabic Idiom\n``` php\ndump(ArPhpLaravel::int2indic(123)); // ١٢٣\n```\n\n#### Arabic Glyphs to Render Arabic Text\n``` php\ndump(ArPhpLaravel::utf8Glyphs(1229));\n```\n\n#### translate arabic text to english, useful for slug generating\n``` php\ndump(ArPhpLaravel::translate('اهلا بالكل')); // Ahla Balkl\n```\n\n### Search with Eloquent and query Builder\nUsing search for arabic letters with Eloquent Builder\n```php\nModel::searchAr('فلسطين','content')-\u003eget();\n```\n\n\nyou can use the same with Query Builder:\n```php\nDB::table('table_name')-\u003esearchAr('فلسطين','content')-\u003eget();\n```\n\n\nyou can set the search mode `OR` (default) or `AND`\n```php\nDB::table('table_name')-\u003esearchAr('فلسطين','content','OR')-\u003eget();\n```\n\n\nand it will find result for any of the words:\n\u003eفلسطينيون فلسطيني فلسطينية فلسطينيتين فلسطينيين فلسطينيان فلسطينيات فلسطينيوا\n\nyou can also sort the results by using:\n```php\nDB::table('table_name')-\u003eorderAr('فلسطين','content')-\u003eget();\n```\n\n## Testing\n``` bash\ncomposer test\n```\n\n## Changelog\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n- [Khaled Alshamaa](https://github.com/khaled-alshamaa)\n- [All Contributors](../../contributors)\n\n## Todo\n- write more tests\n- add more functions from the main package\n- add helpers for the Facade\n\n## License\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstill-code%2Far-php-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstill-code%2Far-php-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstill-code%2Far-php-laravel/lists"}