@if(count((array) $result['inventorysData'])>0) @foreach ($result['inventorysData'] as $rsVal) @php $dip = getAvailableStocks($rsVal->id); //print_r($dip); @endphp @endforeach @endif
Inventory Report: {{date('d-m-Y')}}
Product Name Available Stock Supplier
{{ $rsVal->name }} @if(count((array) $dip)>0) {{ $dip[0]->availableStock }} @if(count((array) $rsVal['get_units'])>0) {{ $rsVal['get_units']->name }} @endif @endif @if(count((array) $rsVal['get_suppliers'])>0){{ $rsVal['get_suppliers']->name }}@endif