Exemplo n.º 1
0
 protected function findModel($id)
 {
     if (($model = Customers::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 2
0
 public function getParent($id)
 {
     $usr = User::findOne(['id' => $id]);
     $cust = Customers::findOne(['customer_name' => $usr->fullname]);
     //$usr = User::findOne(['id' => $cust->user_id]);
     //var_dump($cust);
     //die;
     return $cust->typeprices_id;
 }