/** * Displays a single Firms model. * @param integer $id * @return mixed */ public function actionView($id) { $model = $this->findModel($id); $searchModel = new PatientsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $id); return $this->render('//patients/index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'firm_id' => $model->id]); }
/** * Lists all Patients models. * @return mixed */ public function actionIndex($firm_id = false) { $searchModel = new PatientsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'firm_id' => $firm_id]); }