src/Database/Migration/SchemaConnection.php
/**
	 * Checks if the column exists in the database.
	 *
	 * @param string $tableName
	 * @param string $columnName
	 * @return bool
	 */
Checks if the column exists in the database.
@param string $tableName
@param string $columnName
@return bool
Checks if the column exists in the database . @param string $tableName @param string $columnName @return bool
public function hasColumn($tableName, $columnName) {
		$query = str_join(
			'SHOW COLUMNS FROM',
			Grammar::compileName($this->prefix($tableName)),
			'LIKE',
			Grammar::compileString($columnName)
		) . ';';
		$rows = $this->database->query($query);
		return count($rows) > 0;
	}
public function hasColumn ( $ tableName , $ columnName ) { $ query = str_join ( 'SHOW COLUMNS FROM' , Grammar :: compileName ( $ this -> prefix ( $ tableName ) ) , 'LIKE' , Grammar :: compileString ( $ columnName ) ) . ';' ; $ rows = $ this -> database -> query ( $ query ) ; return count ( $ rows ) > 0 ; }
Checks if the column exists in the database.
Checks if the column exists in the database .