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