From 85baa91a4a17dec98160a716423fb62b3601bf40 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 11 Jul 2018 16:45:07 +0800 Subject: [PATCH] fix reading closet --- app/Models/Closet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Closet.php b/app/Models/Closet.php index ac9eeba4..cb7bfaf1 100644 --- a/app/Models/Closet.php +++ b/app/Models/Closet.php @@ -41,7 +41,7 @@ class Closet $this->db = DB::table('closets'); // Create a new closet if not exists - if ($this->db->where('uid', $uid)->isEmpty()) { + if ($this->db->where('uid', $uid)->count() == 0) { $this->db->insert([ 'uid' => $uid, 'textures' => '[]'