@include('includes.head') {{__('headManga')}} {{-- --}} {{-- --}} @php $latestmanga = $result->take(9); $getId = function ($id,$lang){ return $desired_object = $lang->filter(function ($item) use($id) { return $item->manga_id == $id; }); }; $getScore = function( $id, $section){ return $ratings = DB::table('ratings') ->where('parent_id','=',$id) ->where('section','=',$section) ->select(DB::raw("SUM(star) as score"),DB::raw("COUNT(id) as count")) ->first(); }; $loc = App::getLocale(); @endphp @php use Illuminate\Support\Facades\Route; $route = Route::current(); @endphp
@include('includes.header')
@include('includes.breadcrumb')
{{__('cat')}}
@if(in_array($route->uri(),['manga/category/{id}']))

{{__('allManga')}} - {{ $m_category_name }}

@else

{{__('allManga')}}

@endif
{{$count}} {{__('result')}}
{{__('order')}}:
@foreach($result->chunk(2) as $items)
@foreach($items as $item)

{{$item->m_title}}

@php $tempScore = $getScore($item->id,0); @endphp @if($tempScore->score) @php if($tempScore->count == 0 ){ $scr = 0; } else{ $scr= $tempScore->score/$tempScore->count; } $scr = round($scr * 2)/2; $tempscr = $scr; if(in_array($scr,[0.5,1.5,2.5,3.5,4.5 ])){ $tempscr = $tempscr +1; } @endphp @for($i=1;$i<=$tempscr;$i++) @if($tempscr - $i != 0.5) @else @endif @endfor @for($i=1;$i<=5-$scr;$i++) @endfor {{$scr}} @else 0.0 @endif
@foreach($getId($item->id,$mangas_list)->take(2) as $it)
{{__('Episode')}} {{ $it->episode_number }} @php date_default_timezone_set('Asia/Baku'); $starttimestamp = strtotime($it->created_at); $endtimestamp = strtotime(now()); $difference = abs($endtimestamp - $starttimestamp)/3600; @endphp @if(floor($difference) < 24) {{floor($difference)}} saat əvvəl @else {{date_format(date_create($it->created_at),'d-m-Y')}} @endif
@endforeach
@endforeach
@endforeach
@include('includes.footer-anistyle')