Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 分析错误:Laravel中的数值文字无效_Php_Laravel - Fatal编程技术网

Php 分析错误:Laravel中的数值文字无效

Php 分析错误:Laravel中的数值文字无效,php,laravel,Php,Laravel,我已经收到了我的Laravel申请表 结果表明,错误指向以下行: /* August */ $augledcrdt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date',08)->where('company_id',$companyids)->sum('credit_amt');

我已经收到了我的Laravel申请表

结果表明,错误指向以下行:

/* August */    
$augledcrdt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date',08)->where('company_id',$companyids)->sum('credit_amt');
$augleddebt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date',08)->where('company_id',$companyids)->sum('debit_amt');

/* September */     
$sepledcrdt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date',09)->where('company_id',$companyids)->sum('credit_amt');
$sepleddebt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date',09)->where('company_id',$companyids)->sum('debit_amt');

如果使用PHP7,则应将
08
更改为
8

->whereMonth('transaction_date', 8)

我认为您正在使用PHP7.0。您可以使用以下代码执行此操作:

$augledcrdt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date','08')->where('company_id',$companyids)->sum('credit_amt');
$augleddebt=Companyledger::WhereIn('frm_ledger',$ledgerlist)->whereYear('transaction_date',$curyear)->whereMonth('transaction_date','08')->where('company_id',$companyids)->sum('debit_amt');

将“08”改为“08”