<input type="hidden" name="MasterTransaksi[dokter]" value="{{dokterCollection}}"> </div> <div class="row"> <label>Perawat</label> <table class="table table-bordered"> <thead> <th>No.</th> <th>Nama Perawat</th> </thead> <tbody> <tr ng-repeat="perawat in perawatCollection"> <td>{{$index+1}}</td> <td width="80%"> <?php $perawat = Perawat::model()->findAll(); ?> <select ng-change="updatePerawat($index, perawat.id_perawat)" ng-model="perawat.id_perawat"> <option value="">--- Pilih ---</option> <?php for ($i = 0; $i < count($perawat); $i++) { echo '<option value="' . $perawat[$i]['id_perawat'] . '">' . $perawat[$i]['nama'] . '</option>'; } ?> </select> </td> <td> <span class="btn btn-small btn-warning pull-right" ng-click="deleteRowPerawat($index)">x</span> </td> </tr> <tr>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Perawat the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Perawat::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }