
<?php
use Yiisoft\Data\DataProvider\ArrayDataProvider;
use Yiisoft\Yii\DataView\GridView;

echo '<h1>Package List</h1>';

$provider = new ArrayDataProvider($packages ?? []);
echo GridView::widget()
	->dataProvider($provider)
	->columns([
		['attribute' => 'name', 'label' => 'Name'],
		['attribute' => 'version', 'label' => 'Version'],
		['attribute' => 'repo_url', 'label' => 'Repository URL'],
	]);

