/** * Finds the PaymentChannel model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $payment_channel_id * @param integer $customer_id * @return PaymentChannel the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($payment_channel_id, $customer_id) { if (($model = PaymentChannel::findOne(['payment_channel_id' => $payment_channel_id, 'customer_id' => $customer_id])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }