lotos2512 / array_search_model
search model by array
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.2.0
- yiisoft/yii2: ^2.0.14
Requires (Dev)
- php: >=7.2.0
- yiisoft/yii2: ^2.0.14
This package is not auto-updated.
Last update: 2025-04-10 20:24:29 UTC
README
This library by search data from array
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require lotos2512/array_search_model dev-master
Base usage
$data = ChildArraySearchModel::find() ->where(['in', 'array_field', array]) ->where(['===', 'array_field_or_callback_with_result_can_be_array_or_array_value', equal_value]) ->where(['regex', array_field_or_callback_with_result_can_be_array_or_array_value, equal_value|equal_value|equal_value]) ->orderBy(callback_with_sort_function_result) ->limit(int_value) ->offset(int_value) ->indexBy('array_field') ->all();