@php
$cols = 8;
if ( $content_page->category_id->count() ) {
$otherarticles = \App\ContentPage::where('id', '!=', $content_page->id)->whereHas("category_id", function ($query) use( $content_page ) {
$query->where('id', $content_page->category_id->pluck('id')->toArray());
})->limit(10)->orderBy('id', 'desc');
if ( $otherarticles->count() == 0 ) {
$cols = 12;
}
} else {
$cols = 12;
}
@endphp
@if($content_page->featured_image && file_exists(public_path() . '/thumb/' . $content_page->featured_image))
@endif
@if( $content_page->page_text )
{!! clean($content_page->page_text) !!}
@endif
@if($content_page->category_id->count())
@endif
@if($content_page->tag_id->count())
@endif
@if( $cols == 8 )
@lang('custom.articles.related-pages')
@endif
@lang('global.app_back_to_list')