Skip to content

Commit

Permalink
Update Model.php
Browse files Browse the repository at this point in the history
  • Loading branch information
atishhamte authored Mar 29, 2019
1 parent 45af416 commit 53f2970
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,18 +369,7 @@ public function findColumn(string $columnName)
->asArray()
->find();

if (count($resultSet))
{
$data = [];
foreach ($resultSet as $item)
{
$data[] = $item[$columnName];
}

return $data;
}

return null;
return (!empty($resultSet)) ? array_column($resultSet, $columnName) : null;
}

//--------------------------------------------------------------------
Expand Down

0 comments on commit 53f2970

Please sign in to comment.