initial project
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('getColumnValues')) {
|
||||
|
||||
function getColumnValues($model, string $whereColumn, $whereValue, string $columnToExtract)
|
||||
{
|
||||
$data = $model->where($whereColumn, $whereValue)->findAll();
|
||||
if($data){
|
||||
return array_column($data, $columnToExtract);
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user