@foreach ($history as $item)
@php
$content = [];
$link = '';
$attach = '';
if( $item->type == 'news'){
$content = $item->news;
if( $content )
$link = url('news/'. $content->id .'/' . encodelink( $content->subject ) );
} else if( $item->type == 'events'){
$content = $item->events;
if( $content )
$link = url('event/'. $content->id .'/' . encodelink( $content->subject ) );
} else if( $item->type == 'blog'){
$content = $item->blog;
if( $content ){
$link = url('blogs/'. $content->id .'/' . encodelink( $content->subject ) );
$attach = $content->attach_blogs;
}
} else if( $item->type == 'blogs'){
$content = $item->blogs;
if( $content ){
$link = url('what-works/blogs/'. $content->id .'/' . encodelink( $content->subject ) );
$attach = $content->attach_blogs;
}
} else if( $item->type == 'journal-archives'){
$content = $item->archives;
if( $content ){
$link = url('journal/archives/'. $content->id .'/' . encodelink( $content->subject ) );
$attach = $content->attach;
}
}
@endphp
@if($content)
{{ $content->subject }}
{!! $content->description !!}
@endif
@endforeach
{{--
Lorem ipsum dolor sit amet, consectetur
Lorem ipsum dolor sit amet, consectetur adipisicing elit, adipisicing elit, sed do eiusmod tempor
--}}