@include('main.includes.head') @include('includes.head') Anifan - {{__('headHome')}} @php use Illuminate\Support\Facades\DB; $latestmanga = $mangas->take(9); $getId = function ($id,$lang){ return $desired_object = $lang->filter(function ($item) use($id) { return $item->manga_id == $id; }); }; $loc = App::getLocale(); $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(); }; //dd($getId(2,$mangas_list)->take(2)); @endphp
{{-- @include('includes.header')--}}
@include('includes.header') {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{--
--}}

{{ __('newMangas') }}

@foreach($mangas->take(12)->chunk(4) as $manga)
@foreach($manga 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)
m_folder,$it->episode_number]) }}" class="btn-link"> {{__('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) m_folder,$it->episode_number]) }}" title="{{floor($difference)}} saat əvvəl"> {{floor($difference)}} saat əvvəl @else {{date_format(date_create($it->created_at),'d-m-Y')}} @endif
@endforeach
@endforeach
@endforeach
{{-- --}}
{{ __('mangaCat') }}
{{--
--}} {{--
--}} @include('includes.footer-anistyle') @include('includes.ads')
{{--@include('includes.footer')--}}
@include('includes.login') @include('main.includes.scripts') @include('includes.scripts') {{-- --}} {{----}} {{----}} {{----}}