@if(isset($data))
@foreach($data as $key=>$value)
|
@if($value->department!=null)
{{$value->department}}
@else
--
@endif
|
@if($value->fuel_qty!=null)
{{$value->fuel_qty}}
@else
--
@endif
|
@if($value->fuel_qty && $value->fuel_qty > 0)
{{$value->fuel_type}}
|
@elseif($value->other_fuel_types)
@php
$types = explode(',', $value->other_fuel_types); // Split the string into an array
$trimmedTypes = array_map('trim', $types); // Trim whitespace from each value
$uniqueTypes = array_unique($trimmedTypes); // Get unique values
$uniqueTypesString = implode(',', $uniqueTypes); // Concatenate back into a comma-separated string
@endphp
{{$uniqueTypesString}}
|
@else
--
|
@endif
@endforeach
@endif