public function actionSearch()
    {
        $searchModel = new Vocabulary;

        if (!$searchModel->load(Yii::$app->request->get(), '')) {
            return $this->redirect(['forum/advanced-search']);
        }

        return $this->render('search', [
            'dataProvider' => $searchModel->search(),
            'query' => $searchModel->query,
        ]);
    }
public function actionSearch()
    {
        $searchModel = new Vocabulary;

        if (!$searchModel->load(Yii::$app->request->get(), '')) {
            return $this->redirect(['forum/advanced-search']);
        }

        return $this->render('search', [
            'dataProvider' => $searchModel->search(),
            'query' => $searchModel->query,
        ]);
    }
public function actionSearch ( ) { $ searchModel = new Vocabulary ; if ( ! $ searchModel -> load ( Yii :: $ app -> request -> get ( ) , '' ) ) { return $ this -> redirect ( [ 'forum/advanced-search' ] ) ; } return $ this -> render ( 'search' , [ 'dataProvider' => $ searchModel -> search ( ) , 'query' => $ searchModel -> query , ] ) ; }
Searching through the forum.
@return string
Searching through the forum .