title: FIlter setup in GridView in YII2
body: <p>Hi i have a yii code in which i can able to display the data from the model but the search bar was not comming in the gridview, please help.</p>
  
  <p>Gridview code : </p>
  
  <pre><code>&lt;?= GridView::widget([
          'dataProvider' =&gt; $dataProvider,
          'filterModel' =&gt; $searchModel,
          'columns' =&gt; [
              ['class' =&gt; 'yii\grid\SerialColumn'],
  
             // 'emp_attendance_pid',
              [
  
                      'label' =&gt; 'Employee ID',
                      'attribute' =&gt; 'emp_history_id',
                      'value' =&gt; 'emp_history_id',
              ],
              [
                    'label' =&gt; Yii::t('app','First Name'),
                   // 'attribute' =&gt; 'emp_history_id',
                    'value' =&gt; 'empHistory.emp_first_name',
                  'filter' =&gt; ArrayHelper::map(app\modules\employee\models\EmpInfo::find()-&gt;all(), 'emp_info_id', 'emp_first_name')
              ],
              [
                    'label' =&gt; Yii::t('app','Last Name'),
                   // 'attribute' =&gt; 'emp_history_id',
                    'value' =&gt; 'empHistory.emp_last_name',
                  'filter' =&gt; ArrayHelper::map(app\modules\employee\models\EmpInfo::find()-&gt;all(), 'emp_info_id', 'emp_last_name')
              ],
  </code></pre>
  
  <p>Here you can see the filter, in that i am able to get the data using the arrayhelper but i need to get data which i am giving in the search box, the search box was also not coming, only drop down is comming</p>