Answer the question
In order to leave comments, you need to log in
How to connect in advanced Yii2 from vendor files?
In basic it turned out to connect like this:
namespace app\assets;
use yii\web\AssetBundle;
class FoundationAsset extends AssetBundle
{
public $sourcePath = '@vendor/bower/foundation/';
public $js = [
'js/foundation.min.js'
];
}
Answer the question
In order to leave comments, you need to log in
Did Composer install those files correctly? do they exist physically? I'm about
public $sourcePath = '@vendor/bower/foundation/';
public $js = [
'js/foundation.min.js'
];
<?php
namespace app\assets;
use yii\web\AssetBundle;
class BootstrapAsset extends AssetBundle
{
public $sourcePath = '@bower/foundation';
public $js = [
'js/foundation.min.js'
];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question