Download the PHP package sinarajabpour1998/alpha-helper without Composer
On this page you can find all versions of the php package sinarajabpour1998/alpha-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sinarajabpour1998/alpha-helper
More information about sinarajabpour1998/alpha-helper
Files in sinarajabpour1998/alpha-helper
Package alpha-helper
Short Description Provides helper functions and validators in laravel.
License MIT
Homepage https://github.com/sinarajabpour1998/alpha-helper
Informations about the package alpha-helper
Laravel Alpha Helper
Quick links
-
Installation
-
Publish Config file
-
Helper functions and facades that exists in package
-
Helper Functions Usage
-
Validators that exists in package
-
Validators Usage
-
Categories Usage
- Requirements
Installation
Publish Config file
Helper functions and facades that exists in package
Helper Functions Usage
Validators that exists in package
- National Code (کد ملی)
- IBAN (شماره شبا)
- Debit Card (شماره کارت بانکی)
- Postal Code (کد پستی)
- Shenase Meli (شناسه ملی)
- Mobile (موبایل)
- Phone (تلفن ثابت)
- Unique Dynamic (تشخیص یکتایی دو ستونه)
- Persian Alphabetic (الفبای فارسی)
- Persian Number (اعداد فارسی)
- No Special Chars (بدون کاراکتر خاص)
- Address (آدرس)
Validators Usage
national_code
A rule for validating Iranian national code (How calculated)
iban
A rule for validating IBAN (International Bank Account Number) known in Iran as Sheba. (How calculated)
debit_card
A rule for validating Iranian debit cards. (How calculated)
postal_code
shenase_meli
A rule for validating Iranian shenase meli (How calculated)
mobile
username (Valid characters: English Alphabetic, Numbers and _)
phone
unique_dynamic (table_name, target_column, extra_column, extra_column_value, ignore_column, ignore_column_value)
persian_alphabetic
persian_number
no_special_chars
address
Categories Usage
This package provides category handling for blew table structure with Category
model:
categories => id, slug, title, category_type, description, parent_id, creator_id
categorizables => category_id, categorizable_id, categorizable_type
Usage in category create blade :
<x-category-options page="create" type="serviceCategory"></x-category-options>
-
this tag generates select options , so you can use it in select or select2 tags.
-
type: the category type used in the table structure, for example postCategory
- page: the blade page that contains the current tag
Usage in category edit blade:
<x-category-options page="edit" type="serviceCategory" parent="{{ $category->parent_id }}" category="{{ $category->id }}"></x-category-options>
-
parent: that contains current category parent_id
- category: that contains current category_id
Usage in specific create blade that contains category:
<x-category-checkboxes page="create" type="serviceCategory"></x-category-checkboxes>
-
this tag generates checkboxes , so you can use it in any div tag.
-
type: the category type used in the table structure, for example postCategory
- page: the blade page that contains the current tag
Usage in specific edit blade that contains category:
<x-category-checkboxes type="serviceCategory" page="edit" checked="{{ $service->categories->pluck('id') }}"></x-category-checkboxes>
- checked: an array that contains synced categories with the main object, for example services->categories
Requirements:
- PHP v7.0 or above
- Laravel v7.0 or above