src/Database/QueryBuilder.php
/**
	 * Gets an object for the first matching result, or null if not found.
	 *
	 * @return Model|object|null
	 */
Gets an object for the first matching result, or null if not found.
@return Model|object|null
Gets an object for the first matching result or null if not found . @return Model|object|null
public function first() {
		$this->limit(1);
		$results = $this->get();
		if (!empty($results)) {
			return $results[0];
		}
		return null;
	}
public function first ( ) { $ this -> limit ( 1 ) ; $ results = $ this -> get ( ) ; if ( ! empty ( $ results ) ) { return $ results [ 0 ] ; } return null ; }
Gets an object for the first matching result, or null if not found.
Gets an object for the first matching result or null if not found .
// Set the limit to 1 row // Get the results // Return the first result