每个人。我面临以下错误
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>