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