我们如何在yii2中设置设计

I am recently switched from yii to yii2 . programetically it is looking same as of the older version but I am unable to understand some points . 1) How can i create theme in this . Like in previous version . We create our theme and assign the name in config file . But if i ma trying the same way in the yii 2 it is trowing the error

Setting unknown property: yii\web\Application::theme

the code in main.php is

id' => 'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'name' => 'My yii2 Advance',
    'theme' => 'HumHub',
    'bootstrap' => ['log'],
    'modules' => [],

2) How can i include the css files from folder name WEB . Like in the old version the css files was in theme folder so we was including this like

 <link href="<?php echo Yii::app() -> theme -> baseUrl; ?>/css/meanmenu.css" rel="stylesheet">

how can we do this in yii2 .

please let me know if some one can clear this point . Thanks

  1. Create a layout file under views.layout.
  2. You can create a asset file under assets, like AppAsset.
  3. Register the customAsset in you layout.
  4. Then, you can assign anywhere in any controller a layout.
  5. Give some try, and bring your findings here.