CakePHP, PHP

List table columns in cakephp 3

List table columns

$db = \Cake\Datasource\ConnectionManager::get('default');
$collection = $db->schemaCollection();
$table= $collection->describe('tablename');
$columns = $table->columns();