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

@lang('global.articles.title')

{{ ucfirst($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)
@endif
@if( $article->page_text ) {!!$article->page_text!!} @else {!!$article->excerpt!!} @endif
@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 ) {!!$oarticle->excerpt!!} @else {!!$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