Download the PHP package dizatech/helper without Composer
On this page you can find all versions of the php package dizatech/helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dizatech/helper
More information about dizatech/helper
Files in dizatech/helper
Package helper
Short Description This is a package of simple helper functions which may be useful in any laravel project.
License MIT
Informations about the package helper
Dizatech Helper
Dizatech is a package developed to add validation, banking and view helpers to Laravel projects with Iranian/Persian projects' needs in mind. This package is highly inspired by the works of my dear friend and colleague @imvahid.
Installation
-
Require the package via composer
- Run the following command to publish package files
Validation Rules
National Code
برای اعتبار سنجی کد ملی شخص حقیقی
Add new NationalCode()
to validation rules array.
String passed for validation must be 10 characters long. National codes with zero(s) in the begining should be passed as string with their leading zeros. It's recommended to zero-pad national codes before using them for any purpose, including validation.
Zero-padding example
Bare php:
Inside Laravel reuest file:
Validation in laravel controller:
National Id
برای اعتبار سنجی شناسه ملی شخص حقوقی
Add new Nationalid()
to validation rules array.
String passed for validation must be 11 characters long.
Internationalization
If you haven't run php artisan vendor:publish
command yet, first run the floowing command to publish language files:
Language files will be copied to en
and fa
folders inside lang
folder of your project. You can customize error message as desired. Make sure you set coorect locale for your app in config/app.php
.
For Farsi it shuld be set as: