@extends('layouts.master') @section('title',__('All Genres')) @section('breadcum') @endsection @section('maincontent')
@can('genre.delete') @endcan @can('genre.create') {{ __('Create Genre') }} @endcan @if (Session::has('changed_language')) {{ __('Translate All To') }} {{Session::get('changed_language')}} @endif {{-- Bulk Delete Model Start --}} {{-- Bulk Delete Model End --}} {{-- Impport Model Start --}} {{-- Import Model End --}}
@if(isset($genres) && $genres->count() > 0) @foreach($genres as $genre) @php if($genre->image != NULL){ $content = @file_get_contents(public_path() .'/images/genre/' . $genre->image); if($content){ $image = public_path() .'/images/genre/' . $genre->image; }else{ $image = Avatar::create($genre->name)->toBase64(); } }else{ $image = Avatar::create($genre->name)->toBase64(); } $imageData = base64_encode(@file_get_contents($image)); if($imageData){ $src = 'data: '.mime_content_type($image).';base64,'.$imageData; } @endphp
@if($src != NULL) {{$genre->name}} @endif
{{$genre->name}}
@can('genre.edit') @endcan @can('genre.delete')
@endcan
@endforeach @endif
{!! $genres->appends(request()->query())->links() !!}
@endsection @section('script') @endsection