frontend/controllers/ClientController.php
public function actionIndex()
    {
        $query = Client::find()->where(['user_id' => Yii::$app->user->id])->orderBy(['created_at' => SORT_DESC]);
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        return $this->render('index', [
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex()
    {
        $query = Client::find()->where(['user_id' => Yii::$app->user->id])->orderBy(['created_at' => SORT_DESC]);
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        return $this->render('index', [
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( ) { $ query = Client :: find ( ) -> where ( [ 'user_id' => Yii :: $ app -> user -> id ] ) -> orderBy ( [ 'created_at' => SORT_DESC ] ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; return $ this -> render ( 'index' , [ 'dataProvider' => $ dataProvider , ] ) ; }
Lists all App models.
@return mixed
Lists all App models .