Find data by id.

@param       $id
@param array $columns

@return mixed
327780
public function findByUid($id, $columns = ['*'])
    {
        $this->applyCriteria();
        $this->applyScope();
        $model = $this->model->where('uid', '=', $id)->firstOrFail($columns);
        $this->resetModel();

        return $this->parserResult($model);
    }
763574
public function findMany($id, $columns = array('*'))
	{
		$this->query->whereIn($this->model->getKeyName(), $id);

		return $this->get($columns);
    }
715400
public function get($id, $rootId=NULL, array $columns=[])
    {
        $columns = $this->pickColumns($columns);
        $columnsId = $this->getColumnsCacheId($columns);

        if (isset($this->_hierachyCache[$columnsId][$id])) {
            return $this->_hierachyCache[$columnsId][$id];
        }

        // If we have a root id, fill the cache by fetching the whole tree
        if ($rootId) {
            $this->tree($rootId, $columns);
        }

        // After retrieving the tree, look if it is now in cache
        if (isset($this->_hierachyCache[$columnsId][$id])) {
            return $this->_hierachyCache[$columnsId][$id];
        }

        $result = $this->queryTreeById($id)
                       ->get($this->toSelectColumns($columns));

        $this->fillNodeCache($columnsId, $result);

        if (isset($this->_hierachyCache[$columnsId][$id])) {
            return $this->_hierachyCache[$columnsId][$id];
        }

    }
995988
static public function find($id)
    {
        $model = new static;
        $result = $model->execute('SELECT * FROM '.$model->table.' WHERE '.$model->key.' = ?', [$id]);
        if (is_array($result)) {
            $result = current($result);
        }
        return $result;
    }
515159
public function find($id, $columns = ['*'])
    {
        if (is_array($id) || $id instanceof Arrayable) {
            return $this->findMany($id, $columns);
        }

        return $this->whereKey($id)->first($columns);
    }
285030
public function findBy($field, $id, array $columns = ['*'])
    {
        $this->applyCriteria();

        $model = $this->model->where($field, $id)->first($columns);

        if ( ! $model )
            throw new RepositoryException("Model does not exist.");

        return $model;
    }
32027
public function find($key, $columns = ['*'])
    {
        $this->model = $this->model->newQueryWithoutScopes()->findOrFail($key, $columns);

        return $this->model;
    }
117893
public function removeColumn($id)
    {
        $returnValue = (bool) false;

        
		unset($this->columns[$id]);
		$returnValue = true;
        

        return (bool) $returnValue;
    }
685863
public function find($id, $columns = ['*'])
    {
        $this->parse();

        return $this->getHandler()->find($id, $this->getColumns($columns));
    }
787982
def find_many(self, id, columns=None):
        
        if columns is None:
            columns = ["*"]

        if not id:
            return self._model.new_collection()

        self._query.where_in(self._model.get_qualified_key_name(), id)

        return self.get(columns)
1150196
public static function findOrFail($id, $columns = array('*'))
    {
        $key = (new static)->getKeyName();
        if (ctype_print($id)) {
            $idFinal = (property_exists(static::class, 'uuidOptimization') && static::$uuidOptimization)
            ? self::toOptimized($id) : hex2bin($id);

            return static::where($key, '=', $idFinal)->firstOrFail($columns);
        } else {
            return parent::where($key, '=', $id)->firstOrFail($columns);
        }
    }
140606
public static function loadById(int $id, string $column = '') {
		$class = get_called_class();
		$model = new $class();
		$pk = $model->pk;
		$last = array_pop($model->pk);
		$result = $model->get([
			'where' => [
				$last => $id
			],
			'pk' => [$last],
			'single_row' => true,
			'skip_acl' => true
		]);
		if (!empty($column)) {
			return $result[$column] ?? null;
		}
		return $result;
	}
828224
def find(self, id, columns=None):
        
        if columns is None:
            columns = ["*"]

        if isinstance(id, list):
            return self.find_many(id, columns)

        self._query.where(self._model.get_qualified_key_name(), "=", id)

        return self.first(columns)
1153805
def find(self, id, columns=None):
        
        if not columns:
            columns = ['*']

        return self.where('id', '=', id).first(1, columns)
468179
public function findOrNew( $id, $columns = ['*'] )
	{
		if ( !is_null( $model = $this->find( $id, $columns ) ) )
		{
			return $model;
		}

		return $this->model->newInstance();
	}
872184
public function findByUuid($uuid, $columns = ['*'])
    {
        if (is_array($uuid) || $uuid instanceof Arrayable) {
            return $this->findManyByUuid($uuid, $columns);
        }

        return $this->whereUuidKey($uuid)->first($columns);
    }
96556
public function findMany($ids, array $columns = ['*'])
    {
        if (empty($ids)) {
            return $this->model->newCollection();
        }

        $this->getBuilder()->whereIn($this->getModel()->getQualifiedKeyName(), $ids);

        return $this->get($columns);
    }