- How do I install atm-code/ar-php-laravel in a Laravel application?
- Install it with Composer using composer require atm-code/ar-php-laravel. Laravel package discovery registers the service provider and facade automatically, so no manual provider entry is needed. You can optionally publish the config file to expose the package defaults.
- Which Laravel and PHP versions does ar-php-laravel 3.0 support?
- Version 3.0.0 adds Laravel 13 support and requires PHP ^8.2. The changelog does not explicitly list which older Laravel or PHP combinations were dropped, so read the composer.json constraints before upgrading. If you are on Laravel 10 or 11, confirm the 2.x constraint line and whether it is still maintained.
- What Arabic text features does this Laravel package provide?
- The package wraps Ar-PHP behind a Laravel service provider and facade. It provides Arabic string manipulation, numbers, dates and Hijri conversion, Quran utilities, and transliteration. Use it where your application needs Arabic text processing rather than only generic localization.
- How can I convert Gregorian dates to Hijri in Laravel with this package?
- Use the package's date and Hijri conversion tools through the facade in a service or domain class. Treat the output as linguistically sensitive: add assertions for known dates and have a native speaker review edge cases. Passing unit tests alone does not guarantee acceptable Hijri or date output.
- Does ar-php-laravel handle Arabic-Indic numerals and number formatting?
- Yes. The package covers Arabic numbers and Arabic-Indic numeral handling alongside string manipulation. Wrap conversion calls in application services and test expected glyphs and separators for your locale. Avoid scattering raw formatting logic across views.
- What PHP extensions or environment settings are required for Arabic text processing?
- 3.0 requires PHP ^8.2 and a normal Laravel application with autodiscovery. Arabic string handling also depends on mbstring, correct encoding, and locale configuration. When these are missing or misconfigured, failures can be silent or subtly wrong rather than throwing clear errors.
- How do I migrate from version 2.x to 3.0 of ar-php-laravel?
- Treat 3.0 as a build-matrix migration rather than a code migration. Diff the 2.0.4 and 3.0.0 composer.json files to see the exact Laravel and PHP constraints, then run the solver against your application. The release has no documented deprecation path or upgrade guide, so the diff is effectively the documentation.
- When should I use this package instead of PHP intl for Arabic dates and numbers?
- If you only need basic Arabic-Indic numerals or localized dates, PHP intl NumberFormatter and IntlDateFormatter may be enough. This package is appropriate when you need broader Arabic text normalisation, transliteration, spelling or Hijri utilities, and Quranic text handling. It would be overkill for teams with only simple intl needs.
- Is ar-php-laravel actively maintained and safe for production use?
- The 3.0.0 release is dominated by Dependabot updates, with Laravel 13 support as the only functional change. That pattern suggests maintenance-mode velocity, but the CI action bumps show the pipeline is being kept current. It is a thin leaf dependency with no migrations or middleware, so architectural risk is low, but confirm the maintainer's support policy.
- How should I test Arabic output and Hijri conversion in a Laravel app?
- Invoke the facade from application or domain services and assert the returned Arabic strings, numerals, and dates in your test suite. Include a compatibility matrix run so the Composer solver proves the package works with your Laravel and PHP versions. For Hijri and numeral output, add native-speaker acceptance checks because unit tests can pass while the linguistic result is still wrong.