I have the following controller
$result = DB::table('customs_duties')
->select(DB::raw('sum(cd_cash) as cd_cash'),DB::raw('sum(cd_creditnote) as cd_creditnote'))
->where('fiscalyear', 1)->get();
I get actual result for two field in:
dd($result);
but when i want to get specific field result such as
dd($result->cd_cash);
I have the following error:
Property [cd_cash] does not exist on this collection instance.