@extends('layouts.app') @section('content')

{{$article->title}} @include('admin.common.drop-down-menu', [ 'links' => [ [ 'route' => 'admin.articles.edit', 'title' => trans('global.app_edit'), 'type' => 'edit', 'icon' => '', 'permission_key' => 'article_edit', ], [ 'route' => 'admin.articles.destroy', 'title' => trans('global.app_delete'), 'type' => 'delete', 'icon' => '', 'redirect_url' => url()->previous(), 'permission_key' => 'article_delete', ], ], 'record' => $article, ] )

@if ( 'yes' === $show_page_heading )
@lang('global.app_view')
@endif
{{ $article->title }} {{$article->created_at->diffForHumans()}}
@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())
@lang('custom.articles.category') @foreach ($article->category_id as $singleCategoryId) {{ $singleCategoryId->title }} @endforeach
@endif @if($article->tag_id->count())
@lang('custom.articles.tag') @foreach ($article->tag_id as $singleCategoryId) {{ $singleCategoryId->title }} @endforeach
@endif
@if( $cols == 8 )

@lang('custom.articles.related-articles')


    @foreach( $otherarticles->get() as $oarticle)
  • {{$oarticle->title}}

    @if( $oarticle->excerpt ) {!!clean($oarticle->excerpt)!!} @else {!!clean($oarticle->page_text)!!} @endif

    {{$oarticle->created_at->diffForHumans()}}
  • @endforeach
@endif

 

@lang('global.app_back_to_list')
@stop @section('javascript') @parent @include('admin.common.standard-ckeditor') @stop