public function getNotRelatedLists($exluded) { if (null == $this->notRelatedLists) { $query = Lists::query(); if ($exluded->count()) { $lists = []; foreach ($exluded as $row) { $lists[] = $row->id; } $query = $query->notInWhere('id', $lists); } // dd($query); $this->notRelatedLists = $query->execute(); } return $this->notRelatedLists; }