findAll(); } public function isDomainBlocked($domain) { if ($this->find($domain)) { return true; } return false; } public function blockDomain($name) { $this->db->transStart(); // set all actors from the domain as blocked model('ActorModel') ->where('domain', $name) ->set('is_blocked', 1) ->update(); $result = $this->insert([ 'name' => $name, ]); $this->db->transComplete(); return $result; } public function unblockDomain($name) { $this->db->transStart(); // unblock all actors from the domain model('ActorModel') ->where('domain', $name) ->set('is_blocked', 0) ->update(); $result = $this->delete($name); $this->db->transComplete(); return $result; } }