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.
Gridview code :
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'emp_attendance_pid',
[
'label' => 'Employee ID',
'attribute' => 'emp_history_id',
'value' => 'emp_history_id',
],
[
'label' => Yii::t('app','First Name'),
// 'attribute' => 'emp_history_id',
'value' => 'empHistory.emp_first_name',
'filter' => ArrayHelper::map(app\modules\employee\models\EmpInfo::find()->all(), 'emp_info_id', 'emp_first_name')
],
[
'label' => Yii::t('app','Last Name'),
// 'attribute' => 'emp_history_id',
'value' => 'empHistory.emp_last_name',
'filter' => ArrayHelper::map(app\modules\employee\models\EmpInfo::find()->all(), 'emp_info_id', 'emp_last_name')
],
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