Placing a jQuery UI after Bootstrap makes no sense, as they are independent of each other at all. But to include a package before another, you should add a dependency on the associated package.
For a custom asset package, you can simply write this:
$depends = [ // Write classes of dependent asset bundles here, for example: 'yii\jui\JuiAsset', ];
But since Bootstrap is a built-in asset, you cannot change it. Instead, you can install it globally through the Asset Manager configuration:
return [ // ... 'components' => [ 'assetManager' => [ 'bundles' => [ 'yii\bootstrap\BootstrapAsset' => [ 'depends' => [ 'yii\jui\JuiAsset', ]; ], ], ], ], ];
Or just install the dependency in one specific place before rendering:
Yii::$app->assetManager->bundles['yii\bootstrap\BootstrapAsset'] = [ 'depends' => [ 'yii\jui\JuiAsset', ]; ],
Official documents:
source share