/** * @return bool|null */ public function exists() { $sql = $this->grammar->compileExists($this); $results = $this->connection->select($sql, $this->getBindings(), !$this->useWritePdo); if (isset($results[0])) { $results = (array) $results[0]; return (bool) $results['exists']; } }