@extends('layouts.master') @section('title',__('All Tv Series')) @section('breadcum') @endsection @section('maincontent')
{{ __('All Tv Series') }}
@can('tvseries.delete') @endcan @if (Session::has('changed_language')) {{ __('Translate All To') }} {{Session::get('changed_language')}} @endif @can('tvseries.create') {{ __('Add Tv Series') }} @endcan {{-- Bulk Delete Model Start --}} {{-- Bulk Delete Model End --}} {{-- Impport Model Start --}} {{-- Import Model End --}}
@if(isset($tv_serieses) && count($tv_serieses) > 0) @foreach($tv_serieses as $item) @php if($item->thumbnail != NULL){ $content = @file_get_contents(public_path() .'/images/tvseries/thumbnails/' . $item->thumbnail); if($content){ $image = public_path() .'/images/tvseries/thumbnails/' . $item->thumbnail; }else{ $image = Avatar::create($item->title)->toBase64(); } }else{ $image = Avatar::create($item->title)->toBase64(); } $imageData = base64_encode(@file_get_contents($image)); if($imageData){ $src = 'data: '.mime_content_type($image).';base64,'.$imageData; } @endphp
@if($src != NULL) ... @endif
{{$item->title}}
{{__('Genre')}}
@php $genres = collect(); if (isset($item->genre_id)){ $genre_list = explode(',', $item->genre_id); for ($i = 0; $i < count($genre_list); $i++) { try { $genre = App\Genre::find($genre_list[$i])->name; $genres->push($genre); } catch (Exception $e) { } } } @endphp

@if (count($genres) > 0) @for($i = 0; $i < count($genres); $i++) @if($i == count($genres)-1) {{$genres[$i]}} @else {{$genres[$i]}}, @endif @endfor @endif

{{__('Ratings')}}
@php $rating = ($item->rating)/2; @endphp
@for($rating = 1; $rating <= 5; $rating++) @if($rating<=$item->rating/2) @else @endif @endfor

{{$item->rating}}/10

{{__('Created By')}}
@php $username = App\User::find($item->created_by); @endphp

{{isset($username) && $username != NULL ? $username->name :'user deleted'}}

{{__('Status')}}

@auth @if(Auth::user()->is_assistant == 1) @if($item->status == 1) {{__('Active')}} @else {{__('De Active')}} @endif @else @if($item->status == 1) {{__('Active')}} @else {{__('De Active')}} @endif @endif @endauth

@endforeach
{!! $tv_serieses->appends(request()->query())->links() !!}
@else
{{__("Let's start :)")}}
{{__('Get Started by creating a tvseries! All of your tvseries will be displayed on this page.')}}
@endif
@endsection @section('script') @endsection