JamesMoss\Flywheel\Result::value PHP Method

value() public method

Get the value specified by $key of the first object in the result.
public value ( $key ) : mixed
return mixed The value, or false if there are no documents or the key doesnt exist.
    public function value($key)
    {
        $first = $this->first();
        if (!$first) {
            return false;
        }
        return isset($first->{$key}) ? $first->{$key} : false;
    }