use isEmpty
on database query result
This commit is contained in:
parent
16c2ba8b64
commit
79746f9e81
@ -41,7 +41,7 @@ class Closet
|
||||
$this->db = DB::table('closets');
|
||||
|
||||
// Create a new closet if not exists
|
||||
if (! $this->db->where('uid', $uid)->get()) {
|
||||
if ($this->db->where('uid', $uid)->isEmpty()) {
|
||||
$this->db->insert([
|
||||
'uid' => $uid,
|
||||
'textures' => '[]'
|
||||
|
Loading…
Reference in New Issue
Block a user