@php
$mainImage = $news->images->filter(function ($image) {
return $image->image_type === 'featured';
})->first();
@endphp
@if ($mainImage)
@endif
{{ $news->description}}
{{$news->company_name}} {{ \Carbon\Carbon::parse($news->date_published)->format('F j, Y') }}
@php
$mainDescription = $news->descriptions->filter(function ($item) {
return $item->description_type === 'main';
})->first();
@endphp
@if ($mainDescription)
{!! str_replace(
['', '', '', ''],
['', '', '', ''],
$mainDescription->description
) !!}
@endif
@php
$leftImage = $news->images->filter(function ($image) {
return $image->image_type === 'left_image';
})->first();
@endphp
@if ($leftImage)
@endif
@php
$rightImage = $news->images->filter(function ($image) {
return $image->image_type === 'right_image';
})->first();
@endphp
@if ($rightImage)
@endif
@php
$shortDescription = $news->descriptions->filter(function ($item) {
return $item->description_type === 'image_description';
})->first();
@endphp
@if ($shortDescription)
{!! str_replace(
['', '', '', ''],
['', '', '', ''],
$shortDescription->description
) !!}
@endif