LMongo\Query\Builder::first PHP Method

first() public method

Execute the query and get the first result.
public first ( array $columns = [] ) : mixed
$columns array
return mixed
    public function first($columns = array())
    {
        $results = $this->take(1)->get($columns)->toArray();
        return count($results) > 0 ? reset($results) : null;
    }
Builder