public function actionIndex()
    {
        $searchModel = new ContactSearch();
        $dataProvider = $searchModel->search(request()->queryParams);
        $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex()
    {
        $searchModel = new ContactSearch();
        $dataProvider = $searchModel->search(request()->queryParams);
        $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( ) { $ searchModel = new ContactSearch ( ) ; $ dataProvider = $ searchModel -> search ( request ( ) -> queryParams ) ; $ dataProvider -> sort -> defaultOrder = [ 'id' => SORT_DESC ] ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , ] ) ; }
Lists all Contact models.
@return mixed
Lists all Contact models .