php - Yii2 Gridview Filter not working? -


i have tried many ways doesn't find solution.

gridview:

       [         'attribute' => 'lbt_book_master_id',         'value' => function($model){             return libraryborrowtransaction::getbookname($model->lbt_book_master_id); },         'filter' => libraryborrowtransaction::getbn(),         ], 

method:

public function getbn() {      $books_data = (new \yii\db\query())         ->select(["lbd_title value","lbd_id id"])         ->from('lib_book_master lbm')         ->join('join','lib_book_details lbs','lbm.lbm_book_details_id = lbd_id')         ->join('join', 'lib_borrow_transaction lbt', 'lbm.lbm_book_no = lbt_book_master_id')         ->where('lbm.lbm_book_no = lbt.lbt_book_master_id')         ->groupby('lbd_id')         ->all();      $data = arrayhelper::map($books_data, 'id', 'value');     return $data; } 

why filter not working?


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -