- How do I install zarbinco/laravel-persian-core?
- Install the package with Composer using the package name zarbinco/laravel-persian-core. In most Laravel applications package discovery will register it automatically; if your app requires manual registration or configuration publishing, follow the package README.
- Which Laravel versions are supported by laravel-persian-core?
- The overview provided here does not list specific Laravel or PHP version constraints. Check the package composer.json and README for the supported Laravel versions before adding it to an existing application.
- What features are included in zarbinco/laravel-persian-core?
- It provides lightweight Persian and Iranian utilities for Laravel, including text and number normalization, mobile formatting, money helpers, validation rules, and offline bank/card/Sheba detection. These helpers are aimed at common Iranian localization and validation tasks.
- Does laravel-persian-core normalize Persian text and numbers?
- Yes, text and number normalization is one of the package's core features. You can use it to standardize Persian or Iranian user input before validation, storage, or display. Check the README for the exact normalization methods and expected outputs.
- How do I format Iranian mobile numbers with this package?
- The package includes mobile formatting utilities for Iranian phone numbers. They are useful for making stored or displayed numbers consistent across forms and APIs. Refer to the README for the exact formatting API and any supported prefix rules.
- Does it provide Laravel validation rules for Iranian data?
- Yes, laravel-persian-core includes Laravel validation rules for Iranian data use cases. You can use them in validators or FormRequests where you need consistent rules for local formats. Check the README for the available rule names and examples.
- How does the offline bank, card, and Sheba detection work?
- The package performs bank, card, and Sheba detection using local offline data rather than an external API. That makes it useful when you need quick detection without network calls. See the README for supported banks, card ranges, and Sheba behavior.
- Can I use the money helpers to format Toman or Rial values?
- The package includes money helpers intended for Iranian currency formatting and related tasks. Confirm the exact Toman/Rial behavior, separators, and output format in the README before relying on it in production.
- Is laravel-persian-core suitable for production use?
- It is a lightweight Laravel utility package, and its offline bank/card/Sheba detection avoids external API dependencies. Before production use, review the supported Laravel versions, test coverage, and release notes. Run your own tests for the normalization and validation rules you depend on.
- How can I test Persian normalization and validation rules in Laravel?
- Write Laravel unit or feature tests that pass sample Persian input through the package's normalization helpers and assert the expected output. For validation, test that valid Iranian mobile, card, or Sheba values pass and invalid values fail using your configured rules. The README should provide the method and rule names needed for those tests.