Nestable\NestableTrait::get PHP Метод

get() публичный Метод

Get the data from db to collection or default return.
public get ( ) : mixed
Результат mixed
    public function get()
    {
        // if exists the where or similar things in the query
        // call the from instance
        if (static::$_instance instanceof Builder) {
            $this->source = static::$_instance->get();
        } else {
            // if not call the parent directly
            $this->source = parent::all();
        }
        if (!static::$nested) {
            return $this->source;
        }
        return $this->to(static::$to);
    }