Skip to content

Commit 64ff02c

Browse files
Adds export-ignore attributes and array result
Adds .gitattributes file to exclude certain files and directories from being exported. Improves the CommonModel to handle null options for 'isReset' and adds support for returning results as an array.
1 parent ee8c6c1 commit 64ff02c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.github/ export-ignore
2+
composer.lock export-ignore
3+
CODE_OF_CONDUCT.md export-ignore
4+
CHANGELOG.md export-ignore
5+
CONTRIBUTING.md export-ignore
6+
LICENSE export-ignore
7+
SECURITY.md export-ignore
8+
docs/ export-ignore

app/Models/CommonModel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ public function lists(string $table, string $select = '*', array $where = [], st
9393
}
9494
}
9595
$builder->orderBy($order);
96-
if ($options['isReset'] == true) return $builder->get()->getRow();
96+
if (!empty($options['isReset']) && $options['isReset'] == true) return $builder->get()->getRow();
9797
if ($limit >= 0 || $pkCount >= 0) $builder->limit($limit, $pkCount);
98+
if (!empty($options['isArray']) && $options['isArray'] == true) return $builder->get()->getResultArray();
9899
return $builder->get()->getResult();
99100
}
100101

0 commit comments

Comments
 (0)