duanlan3598 2019-08-14 10:04
浏览 501

无法打开流:/var/www/html/fisecal-backend/vendor/composer/ClassLoader.php:444中没有此类文件或目录

I have a class app/Helpers/CommonHelper.php and I use this in controller like use App\Helpers\CommonHelper; and i called a static function of this class CommonHelper::addAccounts(); but the problem is it is giving me an error of

include(/var/www/html/fisecal-backend/vendor/composer/../../app/Helpers/CommonHelper_bck.php): failed to open stream: No such file or directory

I tried to remove cache by using command 'php artisan optimize:clear'. please help me to find what i missed.

CommonHelper.php

<?php
namespace App\Helpers;

use App\Models\UserInstituteAccounts;
use App\Models\UserTransactions;

class CommonHelper
{
    public static function addAccounts($account) {
        $UserInstituteAccounts = UserInstituteAccounts::where(['account_id' => $account['id']])->first();
        if (empty($UserInstituteAccounts)) {
            $UserInstituteAccounts = new UserInstituteAccounts();
            $UserInstituteAccounts->account_id = $account['id'];
        }
        if (isset($account['number']))
            $UserInstituteAccounts->number = $account['number'];
        if (isset($account['name']))
            $UserInstituteAccounts->name = $account['name'];
        if (isset($account['balance']))
            $UserInstituteAccounts->balance = $account['balance'];
        if (isset($account['type']))
            $UserInstituteAccounts->type = $account['type'];
        if (isset($account['status']))
            $UserInstituteAccounts->status = $account['status'];
        if (isset($account['customerId']))
            $UserInstituteAccounts->customerId = $account['customerId'];
        if (isset($account['institutionId']))
            $UserInstituteAccounts->institutionId = $account['institutionId'];
        if (isset($account['createdDate']))
            $UserInstituteAccounts->createdDate = date('Y-m-d H:i:s', $account['createdDate']);
        if (isset($account['aggregationSuccessDate']))
            $UserInstituteAccounts->aggregationSuccessDate = date('Y-m-d H:i:s', $account['aggregationSuccessDate']);
        if (isset($account['aggregationAttemptDate']))
            $UserInstituteAccounts->aggregationAttemptDate = date('Y-m-d H:i:s', $account['aggregationAttemptDate']);
        if (isset($account['lastTransactionDate']))
            $UserInstituteAccounts->lastTransactionDate = date('Y-m-d H:i:s', $account['lastTransactionDate']);
        if (isset($account['currency']))
            $UserInstituteAccounts->currency = $account['currency'];
        if (isset($account['institutionLoginId']))
            $UserInstituteAccounts->institutionLoginId = $account['institutionLoginId'];
        if (isset($account['displayPosition']))
            $UserInstituteAccounts->displayPosition = $account['displayPosition'];

        if(!empty($account['lastUpdatedDate'])){
            $UserInstituteAccounts->lastUpdatedDate = date('Y-m-d H:i:s', $account['lastUpdatedDate']);
        }

        if(!empty($account['detail'])){
            $detail = $account['detail'];

            if(!empty($detail['postedDate'])){
                $UserInstituteAccounts->postedDate = date('Y-m-d H:i:s', $detail['postedDate']);
            }

            if(!empty($detail['availableBalanceAmount'])){
                $UserInstituteAccounts->availableBalanceAmount = $detail['availableBalanceAmount'];
            }

            if(!empty($detail['openDate '])){
                $UserInstituteAccounts->openDate = date('Y-m-d H:i:s', $detail['openDate']);
            }

            if(!empty($detail['periodStartDate'])){
                $UserInstituteAccounts->periodStartDate = date('Y-m-d H:i:s', $detail['periodStartDate']);
            }

            if(!empty($detail['periodEndDate'])){
                $UserInstituteAccounts->periodEndDate = date('Y-m-d H:i:s', $detail['periodEndDate']);
            }

            if(!empty($detail['periodInterestRate'])){
                $UserInstituteAccounts->periodInterestRate = $detail['periodInterestRate'];
            }

            if(!empty($detail['periodDepositAmount'])){
                $UserInstituteAccounts->periodDepositAmount = $detail['periodDepositAmount'];
            }

            if(!empty($detail['periodInterestAmount'])){
                $UserInstituteAccounts->periodInterestAmount = $detail['periodInterestAmount'];
            }

            if(!empty($detail['interestYtdAmount'])){
                $UserInstituteAccounts->interestYtdAmount = $detail['interestYtdAmount'];
            }

            if(!empty($detail['interestPriorYtdAmount'])){
                $UserInstituteAccounts->interestPriorYtdAmount = $detail['interestPriorYtdAmount'];
            }

            if(!empty($detail['maturityDate'])){
                $UserInstituteAccounts->maturityDate = date('Y-m-d H:i:s', $detail['maturityDate']);
            }

            if(!empty($detail['interestRate'])){
                $UserInstituteAccounts->interestRate = $detail['interestRate'];
            }

            if(!empty($detail['creditAvailableAmount'])){
                $UserInstituteAccounts->creditAvailableAmount = $detail['creditAvailableAmount'];
            }

            if(!empty($detail['creditMaxAmount'])){
                $UserInstituteAccounts->creditMaxAmount = $detail['creditMaxAmount'];
            }

            if(!empty($detail['cashAdvanceAvailableAmount'])){
                $UserInstituteAccounts->cashAdvanceAvailableAmount = $detail['cashAdvanceAvailableAmount'];
            }

            if(!empty($detail['cashAdvanceMaxAmount'])){
                $UserInstituteAccounts->cashAdvanceMaxAmount = $detail['cashAdvanceMaxAmount'];
            }

            if(!empty($detail['cashAdvanceBalance'])){
                $UserInstituteAccounts->cashAdvanceBalance = $detail['cashAdvanceBalance'];
            }

            if(!empty($detail['cashAdvanceInterestRate'])){
                $UserInstituteAccounts->cashAdvanceInterestRate = $detail['cashAdvanceInterestRate'];
            }

            if(!empty($detail['currentBalance'])){
                $UserInstituteAccounts->currentBalance = $detail['currentBalance'];
            }

            if(!empty($detail['paymentMinAmount'])){
                $UserInstituteAccounts->paymentMinAmount = $detail['paymentMinAmount'];
            }

            if(!empty($detail['paymentDueDate'])){
                $UserInstituteAccounts->paymentDueDate = date('Y-m-d H:i:s', $detail['paymentDueDate']);
            }

            if(!empty($detail['previousBalance'])){
                $UserInstituteAccounts->previousBalance = $detail['previousBalance'];
            }

            if(!empty($detail['statementStartDate'])){
                $UserInstituteAccounts->statementStartDate = date('Y-m-d H:i:s', $detail['statementStartDate']);
            }

            if(!empty($detail['statementEndDate'])){
                $UserInstituteAccounts->statementEndDate = date('Y-m-d H:i:s', $detail['statementEndDate']);
            }

            if(!empty($detail['statementPurchaseAmount'])){
                $UserInstituteAccounts->statementPurchaseAmount = $detail['statementPurchaseAmount'];
            }

            if(!empty($detail['statementCreditAmount'])){
                $UserInstituteAccounts->statementCreditAmount = $detail['statementCreditAmount'];
            }

            if(!empty($detail['rewardEarnedBalance'])){
                $UserInstituteAccounts->rewardEarnedBalance = $detail['rewardEarnedBalance'];
            }

            if(!empty($detail['pastDueAmount'])){
                $UserInstituteAccounts->pastDueAmount = $detail['pastDueAmount'];
            }

            if(!empty($detail['lastPaymentAmount'])){
                $UserInstituteAccounts->lastPaymentAmount = $detail['lastPaymentAmount'];
            }

            if(!empty($detail['lastPaymentDate'])){
                $UserInstituteAccounts->lastPaymentDate = date('Y-m-d H:i:s', $detail['lastPaymentDate']);
            }

            if(!empty($detail['statementCloseBalance'])){
                $UserInstituteAccounts->statementCloseBalance = $detail['statementCloseBalance'];
            }

            if(!empty($detail['interestMarginBalance'])){
                $UserInstituteAccounts->interestMarginBalance = $detail['interestMarginBalance'];
            }

            if(!empty($detail['shortBalance'])){
                $UserInstituteAccounts->shortBalance = $detail['shortBalance'];
            }

            if(!empty($detail['availableCashBalance'])){
                $UserInstituteAccounts->availableCashBalance = $detail['availableCashBalance'];
            }

            if(!empty($detail['maturityValueAmount'])){
                $UserInstituteAccounts->maturityValueAmount = $detail['maturityValueAmount'];
            }

            if(!empty($detail['vestedBalance'])){
                $UserInstituteAccounts->vestedBalance = $detail['vestedBalance'];
            }

            if(!empty($detail['empMatchAmount'])){
                $UserInstituteAccounts->empMatchAmount = $detail['empMatchAmount'];
            }

            if(!empty($detail['empPretaxContribAmount'])){
                $UserInstituteAccounts->empPretaxContribAmount = $detail['empPretaxContribAmount'];
            }

            if(!empty($detail['empPretaxContribAmountYtd'])){
                $UserInstituteAccounts->empPretaxContribAmountYtd = $detail['empPretaxContribAmountYtd'];
            }

            if(!empty($detail['contribTotalYtd'])){
                $UserInstituteAccounts->contribTotalYtd = $detail['contribTotalYtd'];
            }

            if(!empty($detail['cashBalanceAmount'])){
                $UserInstituteAccounts->cashBalanceAmount = $detail['cashBalanceAmount'];
            }

            if(!empty($detail['preTaxAmount'])){
                $UserInstituteAccounts->preTaxAmount = $detail['preTaxAmount'];
            }

            if(!empty($detail['afterTaxAmount'])){
                $UserInstituteAccounts->afterTaxAmount = $detail['afterTaxAmount'];
            }

            if(!empty($detail['matchAmount'])){
                $UserInstituteAccounts->matchAmount = $detail['matchAmount'];
            }

            if(!empty($detail['profitSharingAmount'])){
                $UserInstituteAccounts->profitSharingAmount = $detail['profitSharingAmount'];
            }

            if(!empty($detail['rolloverAmount'])){
                $UserInstituteAccounts->rolloverAmount = $detail['rolloverAmount'];
            }

            if(!empty($detail['otherVestAmount'])){
                $UserInstituteAccounts->otherVestAmount = $detail['otherVestAmount'];
            }

            if(!empty($detail['otherNonvestAmount'])){
                $UserInstituteAccounts->otherNonvestAmount = $detail['otherNonvestAmount'];
            }

            if(!empty($detail['currentLoanBalance'])){
                $UserInstituteAccounts->currentLoanBalance = $detail['currentLoanBalance'];
            }

            if(!empty($detail['loanRate'])){
                $UserInstituteAccounts->loanRate = $detail['loanRate'];
            }

            if(!empty($detail['buyPower'])){
                $UserInstituteAccounts->buyPower = $detail['buyPower'];
            }

            if(!empty($detail['rolloverLtd'])){
                $UserInstituteAccounts->rolloverLtd = $detail['rolloverLtd'];
            }

            if(!empty($detail['termOfMl'])){
                $UserInstituteAccounts->termOfMl = $detail['termOfMl'];
            }

            if(!empty($detail['mlHolderName'])){
                $UserInstituteAccounts->mlHolderName = $detail['mlHolderName'];
            }

            if(!empty($detail['description'])){
                $UserInstituteAccounts->description = $detail['description'];
            }

            if(!empty($detail['lateFeeAmount'])){
                $UserInstituteAccounts->lateFeeAmount = $detail['lateFeeAmount'];
            }

            if(!empty($detail['payoffAmount'])){
                $UserInstituteAccounts->payoffAmount = $detail['payoffAmount'];
            }

            if(!empty($detail['payoffAmountDate'])){
                $UserInstituteAccounts->payoffAmountDate = date('Y-m-d H:i:s', $detail['payoffAmountDate']);
            }

            if(!empty($detail['originalMaturityDate'])){
                $UserInstituteAccounts->originalMaturityDate = date('Y-m-d H:i:s', $detail['originalMaturityDate']);
            }

            if(!empty($detail['principalBalance'])){
                $UserInstituteAccounts->principalBalance = $detail['principalBalance'];
            }

            if(!empty($detail['escrowBalance'])){
                $UserInstituteAccounts->escrowBalance = $detail['escrowBalance'];
            }

            if(!empty($detail['interestPeriod'])){
                $UserInstituteAccounts->interestPeriod = $detail['interestPeriod'];
            }

            if(!empty($detail['initialMlAmount'])){
                $UserInstituteAccounts->initialMlAmount = $detail['initialMlAmount'];
            }

            if(!empty($detail['initialMlDate'])){
                $UserInstituteAccounts->initialMlDate = date('Y-m-d H:i:s', $detail['initialMlDate']);
            }

            if(!empty($detail['nextPaymentPrincipalAmount'])){
                $UserInstituteAccounts->nextPaymentPrincipalAmount = $detail['nextPaymentPrincipalAmount'];
            }

            if(!empty($detail['nextPaymentInterestAmount'])){
                $UserInstituteAccounts->nextPaymentInterestAmount = $detail['nextPaymentInterestAmount'];
            }

            if(!empty($detail['nextPayment'])){
                $UserInstituteAccounts->nextPayment = $detail['nextPayment'];
            }

            if(!empty($detail['nextPaymentDate'])){
                $UserInstituteAccounts->nextPaymentDate = date('Y-m-d H:i:s', $detail['nextPaymentDate']);
            }

            if(!empty($detail['lastPaymentDueDate'])){
                $UserInstituteAccounts->lastPaymentDueDate = date('Y-m-d H:i:s', $detail['lastPaymentDueDate']);
            }

            if(!empty($detail['lastPaymentReceiveDate'])){
                $UserInstituteAccounts->lastPaymentReceiveDate = date('Y-m-d H:i:s', $detail['lastPaymentReceiveDate']);
            }

            if(!empty($detail['lastPaymentPrincipalAmount'])){
                $UserInstituteAccounts->lastPaymentPrincipalAmount = $detail['lastPaymentPrincipalAmount'];
            }

            if(!empty($detail['lastPaymentInterestAmount'])){
                $UserInstituteAccounts->lastPaymentInterestAmount = $detail['lastPaymentInterestAmount'];
            }

            if(!empty($detail['lastPaymentEscrowAmount'])){
                $UserInstituteAccounts->lastPaymentEscrowAmount = $detail['lastPaymentEscrowAmount'];
            }

            if(!empty($detail['lastPaymentLastFeeAmount'])){
                $UserInstituteAccounts->lastPaymentLastFeeAmount = $detail['lastPaymentLastFeeAmount'];
            }

            if(!empty($detail['lastPaymentLateCharge'])){
                $UserInstituteAccounts->lastPaymentLateCharge = $detail['lastPaymentLateCharge'];
            }

            if(!empty($detail['ytdPrincipalPaid'])){
                $UserInstituteAccounts->ytdPrincipalPaid = $detail['ytdPrincipalPaid'];
            }

            if(!empty($detail['ytdInterestPaid'])){
                $UserInstituteAccounts->ytdInterestPaid = $detail['ytdInterestPaid'];
            }

            if(!empty($detail['ytdInsurancePaid'])){
                $UserInstituteAccounts->ytdInsurancePaid = $detail['ytdInsurancePaid'];
            }

            if(!empty($detail['ytdTaxPaid'])){
                $UserInstituteAccounts->ytdTaxPaid = $detail['ytdTaxPaid'];
            }

            if(!empty($detail['autoPayEnrolled'])){
                $UserInstituteAccounts->autoPayEnrolled = $detail['autoPayEnrolled'];
            }

            if(!empty($detail['collateral'])){
                $UserInstituteAccounts->collateral = $detail['collateral'];
            }

            if(!empty($detail['currentSchool'])){
                $UserInstituteAccounts->currentSchool = $detail['currentSchool'];
            }

            if(!empty($detail['firstPaymentDate'])){
                $UserInstituteAccounts->firstPaymentDate = date('Y-m-d H:i:s', $detail['firstPaymentDate']);
            }

            if(!empty($detail['firstMortgage'])){
                $UserInstituteAccounts->firstMortgage = $detail['firstMortgage'];
            }

            if(!empty($detail['loanPaymentFreq'])){
                $UserInstituteAccounts->loanPaymentFreq = $detail['loanPaymentFreq'];
            }

            if(!empty($detail['originalSchool'])){
                $UserInstituteAccounts->originalSchool = $detail['originalSchool'];
            }

            if(!empty($detail['recurringPaymentAmount'])){
                $UserInstituteAccounts->recurringPaymentAmount = $detail['recurringPaymentAmount'];
            }

            if(!empty($detail['lender'])){
                $UserInstituteAccounts->lender = $detail['lender'];
            }

            if(!empty($detail['endingBalanceAmount'])){
                $UserInstituteAccounts->endingBalanceAmount = $detail['endingBalanceAmount'];
            }

            if(!empty($detail['paymentsRemaining'])){
                $UserInstituteAccounts->paymentsRemaining = $detail['paymentsRemaining'];
            }

            if(!empty($detail['loanTermType'])){
                $UserInstituteAccounts->loanTermType = $detail['loanTermType'];
            }

            if(!empty($detail['paymentsMade'])){
                $UserInstituteAccounts->paymentsMade = $detail['paymentsMade'];
            }

            if(!empty($detail['balloonAmount'])){
                $UserInstituteAccounts->balloonAmount = $detail['balloonAmount'];
            }

            if(!empty($detail['projectedInterest'])){
                $UserInstituteAccounts->projectedInterest = $detail['projectedInterest'];
            }

            if(!empty($detail['interestPaidLtd'])){
                $UserInstituteAccounts->interestPaidLtd = $detail['interestPaidLtd'];
            }

            if(!empty($detail['interestRateType'])){
                $UserInstituteAccounts->interestRateType = $detail['interestRateType'];
            }

            if(!empty($detail['loanPaymentType'])){
                $UserInstituteAccounts->loanPaymentType = $detail['loanPaymentType'];
            }

        }

        $UserInstituteAccounts->save();

        return true;
    }


}

Controller file

<?php
namespace App\Http\Controllers\Cron;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use App\Repositories\FinicityRepository;
use App\Models\UserInstitutes;
use App\Models\UserInstituteAccounts;
use App\Models\UserTransactions;
use App\Models\AppSettings;
use App\Helpers\CommonHelper;


class TransactionsController extends Controller {
    public function index() {
        $customerId = 5;
        $account =  FinicityRepository::getCustomerAccounts($customerId);
        CommonHelper::addAccounts($account);
    }
}
  • 写回答

2条回答 默认 最新

  • dorflv5944 2019-08-14 10:13
    关注

    You are not "autoloading" files. In this case you have to :

    composer install
    

    And than :

    composer dump-autoload -o
    
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器