For example you have next task:
You have input data:
$data = array(1, 2, 'change', 'examples', -1, 'examples');
You need select only strings records delete dublicate and using handler $model->insert() insert each record to db:
Use next code: SeqLibrary::fromarray($data)->select($is_string)->distinct()->each($model->insert);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Put some examples to work with library.
For example you have next task:
You have input data:
$data = array(1, 2, 'change', 'examples', -1, 'examples');
You need select only strings records delete dublicate and using handler $model->insert() insert each record to db:
Use next code:
SeqLibrary::fromarray($data)->select($is_string)->distinct()->each($model->insert);