Illuminate\Database\Query\Builder::value PHP Method

value() public method

Get a single column's value from the first result of a query.
public value ( string $column ) : mixed
$column string
return mixed
    public function value($column)
    {
        $result = (array) $this->first([$column]);
        return count($result) > 0 ? reset($result) : null;
    }