backend/controllers/PaymentsController.php
/**
     * Finds the UserPayments model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param string $id
     * @return UserPayments the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
Finds the UserPayments model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.
@param string $id
@return UserPayments the loaded model
@throws NotFoundHttpException if the model cannot be found
Finds the UserPayments model based on its primary key value . If the model is not found a 404 HTTP exception will be thrown . @param string $id @return UserPayments the loaded model @throws NotFoundHttpException if the model cannot be found
protected function findModel($id)
    {
        $model = UserPayments::find()->with('user')->where(['pay_id' => $id])->one();
        if ($model) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
protected function findModel ( $ id ) { $ model = UserPayments :: find ( ) -> with ( 'user' ) -> where ( [ 'pay_id' => $ id ] ) -> one ( ) ; if ( $ model ) { return $ model ; } else { throw new NotFoundHttpException ( 'The requested page does not exist.' ) ; } }
Finds the UserPayments model based on its primary key value.
Finds the UserPayments model based on its primary key value .
//var_dump($model);exit; //if (($model = UserPayments::findOne($id)) !== null) {