title: CRUD generator yii2 error
body: <p>I have error <code>"syntax error, unexpected '}'"</code> in yii2 CRUD generator. I created controller CountryController in basic/controllers path, model Country in basic/models path and folder country in views. I'm trying to make CRUD operation with parameters:</p>
  
  <p>Model Class : app\models\Country</p>
  
  <p>Search Model Class : app\models\CountrySearch</p>
  
  <p>Controller Class : app\controllers\CountryController</p>
  
  <p>View path : @app/views/country</p>
  
  <p>and have error. I cant find solution in google and dont know what to do.
  <strong>ERROR:</strong></p>
  
  <pre><code> in W:\XAMPP\htdocs\basic\vendor\yiisoft\yii2-gii\generators\crud\default\views\_search.php at line 28
  19202122232425262728293031323334353637 
  &lt;div class="&lt;?= Inflector::camel2id(StringHelper::basename($generator-&gt;modelClass)) ?&gt;-search"&gt;
  
      &lt;?= "&lt;?php " ?&gt;$form = ActiveForm::begin([
          'action' =&gt; ['index'],
          'method' =&gt; 'get',
      &lt;?php if ($generator-&gt;enablePjax) 
          ?&gt;'options' =&gt; [
              'data-pjax'   =&gt; 1
          ],&lt;?php } &gt;
      ]); ?&gt;
  
  &lt;?php
  $count = 0;
  foreach ($generator-&gt;getColumnNames() as $attribute) {
      if (++$count &lt; 6) {
          echo "    &lt;?= " . $generator-&gt;generateActiveSearchField($attribute) . " ?&gt;\n\n";
      } else {
          echo "    &lt;?php // echo " . $generator-&gt;generateActiveSearchField($attribute) . " ?&gt;\n\n";
  2. yii\base\ErrorHandler::handleFatalError()
  $_GET = [
      'r' =&gt; 'gii/default/view',
      'id' =&gt; 'crud',
  ];
  
  $_POST = [
      '_csrf' =&gt; 'ZFFUX0VCUjgAMhwAKDgwZ1UQFw8dexZPLwtlZhEMF2AJAh0ZEi8QFQ==',
      'Generator' =&gt; [
          'modelClass' =&gt; 'app\\models\\Country',
          'searchModelClass' =&gt; 'app\\models\\CountrySearch',
          'controllerClass' =&gt; 'app\\controllers\\CountryController',
          'viewPath' =&gt; '@app/views/country',
          'baseControllerClass' =&gt; 'yii\\web\\Controller',
          'indexWidgetType' =&gt; 'grid',
          'enableI18N' =&gt; '0',
          'enablePjax' =&gt; '0',
          'messageCategory' =&gt; 'app',
          'template' =&gt; 'default',
      ],
      'preview' =&gt; '',
  ];
  
  $_COOKIE = [
      'Phpstorm-b0412478' =&gt; '63e8918e-ac29-43de-9816-571b71512aad',
      '_csrf' =&gt; 'e3a51f05887c990dee11a82408437a3e87c4de7d372dba216a0834374d5b602ca:2:{i:0;s:5:"_csrf";i:1;s:32:"dcH_mzb_1ACPX9DwKZ19TNEXmSIFWmB-";}',
      'PHPSESSID' =&gt; '2a91078gc1nh6q5br71p0hkuu6',
      '_identity' =&gt; '8142bf058f7de9bda458b829902ac7db3b69c135c0c908aaaefe8bf2105e8d62a:2:{i:0;s:9:"_identity";i:1;s:28:"["100","test100key",2592000]";}',
  ];
  </code></pre>