controllers/CitasController.php
/**
     * Lists all Citas models.
     * @return mixed
     */
Lists all Citas models.
@return mixed
Lists all Citas models . @return mixed
public function actionIndex()
    {
        $dataProvider = new ActiveDataProvider([
            'query' => Citas::find()
            ->innerJoin('pacientes','`citas`.`pacientes_id` = `pacientes`.`id`')
            ->andWhere(['citas.pacientes_id' => Yii::$app->session['idPaciente']])
        ]);
        $dataProvider->setPagination(['pageSize' => 5]);
        return $this->render('index', [
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( ) { $ dataProvider = new ActiveDataProvider ( [ 'query' => Citas :: find ( ) -> innerJoin ( 'pacientes' , '`citas`.`pacientes_id` = `pacientes`.`id`' ) -> andWhere ( [ 'citas.pacientes_id' => Yii :: $ app -> session [ 'idPaciente' ] ] ) ] ) ; $ dataProvider -> setPagination ( [ 'pageSize' => 5 ] ) ; return $ this -> render ( 'index' , [ 'dataProvider' => $ dataProvider , ] ) ; }
Lists all Citas models.
Lists all Citas models .