I have two controllers.In controller one which fetches a view i want to use some css file and also some js file.I want to do the same for controller two but the css and js for the two files are not the same at all.
Is it possible to indicate that in a controller so as the css file that is loaded is the one i want and not any other?.
I have made this
public function actionHi(){
$baseUrl = Yii::$app->baseUrl;
$cs = Yii::$app->getClientScript();
$cs->registerScriptFile($baseUrl.'/js/yourscript.js');
$cs->registerCssFile($baseUrl.'/css/yourcss.css');
$message = 'hello';
return $this->render('not_sober',['message' => $message]);
}
which gives me the error