how to create search field in gridview without using search model
<p>I have created sqlDataProvider in my controller and its working. My problem is i dont know how to provide search field since im not using the search model.</p>

<p>this is code in my controller</p>

<pre><code>public function actionAnalisa()
{
    $sql =  "SELECT 
            tbl_permohonan.permohonan_id As permohonan_id, 
            user.id As id, 
            tbl_moderator.bm_id As bm_id, 
            tbl_bhgnmod.unit_kampuscawangan As unit_kampuscawangan, 
            tbl_bahagian.bahagian_nama As bahagian_nama, 
            tbl_unit.unit_nama As unit_nama

            FROM tbl_permohonan

            INNER JOIN user 
            ON tbl_permohonan.user_id=user.id

            INNER JOIN tbl_moderator 
            ON user.id=tbl_moderator.user_id

            INNER JOIN tbl_bhgnmod 
            ON tbl_moderator.bm_id=tbl_bhgnmod.bm_id

            INNER JOIN tbl_bahagian
            ON tbl_bhgnmod.bahagian_id=tbl_bahagian.bahagian_id

            INNER JOIN tbl_unit 
            ON tbl_bhgnmod.unit_id=tbl_unit.unit_id";

    $dataProvider = new SqlDataProvider([
                'sql' =&gt; $sql,
                ]);

    return $this-&gt;render('analisis', [
        // 'searchModel' =&gt; $searchModel,
        'dataProvider' =&gt; $dataProvider,
    ]);
}
</code></pre>

<p>this is in my view</p>

<pre><code>&lt;?= GridView::widget([
           'dataProvider' =&gt; $dataProvider,
           'columns' =&gt; [
               ['class' =&gt; 'yii\grid\SerialColumn'],

               'permohonan_id',
               'id',
               'bm_id',
               'unit_kampuscawangan',
               'bahagian_nama',
               'unit_nama',
               //~ ['class' =&gt; 'yii\grid\ActionColumn'],
           ],
       ]); ?&gt;
</code></pre>