mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修正Model类
This commit is contained in:
@@ -598,7 +598,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
protected static function parseQuery(&$data, $with, $cache)
|
protected static function parseQuery(&$data, $with, $cache)
|
||||||
{
|
{
|
||||||
$result = self::with($with)->cache($cache);
|
$result = self::with($with)->cache($cache);
|
||||||
if (is_array($data)) {
|
if (is_array($data) && key($data) !== 0) {
|
||||||
$result = $result->where($data);
|
$result = $result->where($data);
|
||||||
$data = [];
|
$data = [];
|
||||||
} elseif ($data instanceof \Closure) {
|
} elseif ($data instanceof \Closure) {
|
||||||
|
|||||||
Reference in New Issue
Block a user