public function first()
	{
		$builder = $this->builder();

		if ($this->tempUseSoftDeletes === true)
		{
			$builder->where($this->table . '.' . $this->deletedField, 0);
		}

		// Some databases, like PostgreSQL, need order
		// information to consistently return correct results.
		if (empty($builder->QBOrderBy) && ! empty($this->primaryKey))
		{
			$builder->orderBy($this->table . '.' . $this->primaryKey, 'asc');
		}

		$row = $builder->limit(1, 0)
				->get();

		$row = $row->getFirstRow($this->tempReturnType);

		$row = $this->trigger('afterFind', ['data' => $row]);

		$this->tempReturnType = $this->returnType;

		return $row['data'];
	}
public function first()
	{
		$builder = $this->builder();

		if ($this->tempUseSoftDeletes === true)
		{
			$builder->where($this->table . '.' . $this->deletedField, 0);
		}

		// Some databases, like PostgreSQL, need order
		// information to consistently return correct results.
		if (empty($builder->QBOrderBy) && ! empty($this->primaryKey))
		{
			$builder->orderBy($this->table . '.' . $this->primaryKey, 'asc');
		}

		$row = $builder->limit(1, 0)
				->get();

		$row = $row->getFirstRow($this->tempReturnType);

		$row = $this->trigger('afterFind', ['data' => $row]);

		$this->tempReturnType = $this->returnType;

		return $row['data'];
	}
public function first ( ) { $ builder = $ this -> builder ( ) ; if ( $ this -> tempUseSoftDeletes === true ) { $ builder -> where ( $ this -> table . '.' . $ this -> deletedField , 0 ) ; } // Some databases, like PostgreSQL, need order // information to consistently return correct results. if ( empty ( $ builder -> QBOrderBy ) && ! empty ( $ this -> primaryKey ) ) { $ builder -> orderBy ( $ this -> table . '.' . $ this -> primaryKey , 'asc' ) ; } $ row = $ builder -> limit ( 1 , 0 ) -> get ( ) ; $ row = $ row -> getFirstRow ( $ this -> tempReturnType ) ; $ row = $ this -> trigger ( 'afterFind' , [ 'data' => $ row ] ) ; $ this -> tempReturnType = $ this -> returnType ; return $ row [ 'data' ] ; }
Returns the first row of the result set. Will take any previous
Query Builder calls into account when determining the result set.

@return array|object|null
Returns the first row of the result set . Will take any previous Query Builder calls into account when determining the result set .