0
每個人。我面臨着以下錯誤如何處理Laravel中的htmlentities()異常
htmlentities() expects parameter 1 to be string, object given (View: E:\accounting\resources\views\index.blade.php)
當在laravel運行此查詢,並不知道我失蹤,任何幫助。 感謝 查詢:
$purchase = DB::table('purchases')
->join('currencies', 'currencies.cur_id', '=', 'purchases.currency_id')
->selectRaw('purchases.*, currencies.currency ,SUM(purchases.quantity*unit_price) as total, SUM(purchases.c_price*quantity) as usd_total')
->first();
查看:
<div class="col-xs-8">
<p class="text-elg text-strong mb-0">
{{ number_format($purchase->usd_total,2) }}
</p>
<span>Purchases</span>
</div>