title: How to change default view for controller in Yii2?
body: <p>I was wondering can I change default view folder for a controller in Yii2?</p>
  
  <p>If we can change layout just by using <code>public $layout</code>, how we can do it with view?</p>
  
  <pre><code>Class HomeController extends \yii\web\Controller
  {
      public $layout = 'mylayout';
      public $view = 'newview';
  
      public function actionIndex()
      {
          return $this-&gt;render('index');
      }    
  }
  </code></pre>