controllers/MedicamentosController.php
/**
     * Displays a single Medicamentos model.
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Displays a single Medicamentos model.
@return mixed
@throws NotFoundHttpException if the model cannot be found
Displays a single Medicamentos model . @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionEventual()
    {
        $dataProvider = new ActiveDataProvider([
            'query' => MedicamentosEventual::find()
                        ->innerJoin('pacientes','`medicamentos_eventuales`.`pacientes_id` = `pacientes`.`id`')
                        ->andWhere(['medicamentos_eventuales.pacientes_id' => Yii::$app->session['idPaciente']])
        ]);
        $dataProvider->setPagination(['pageSize' => 5]);
        return $this->render('indexEventual', [
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionEventual ( ) { $ dataProvider = new ActiveDataProvider ( [ 'query' => MedicamentosEventual :: find ( ) -> innerJoin ( 'pacientes' , '`medicamentos_eventuales`.`pacientes_id` = `pacientes`.`id`' ) -> andWhere ( [ 'medicamentos_eventuales.pacientes_id' => Yii :: $ app -> session [ 'idPaciente' ] ] ) ] ) ; $ dataProvider -> setPagination ( [ 'pageSize' => 5 ] ) ; return $ this -> render ( 'indexEventual' , [ 'dataProvider' => $ dataProvider , ] ) ; }
Displays a single Medicamentos model.
Displays a single Medicamentos model .