mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
update: mediahub genres
This commit is contained in:
@@ -23,7 +23,7 @@ class GenreController extends Controller
|
||||
*/
|
||||
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$genres = Genre::paginate(25);
|
||||
$genres = Genre::withCount(['tv', 'movie'])->orderBy('name')->get();
|
||||
|
||||
return view('mediahub.genre.index', ['genres' => $genres]);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
@section('content')
|
||||
<section class="panelV2">
|
||||
<h2 class="panel__heading">{{ __('common.genres') }}</h2>
|
||||
{{ $genres->links('partials.pagination') }}
|
||||
<div class="panel__body blocks">
|
||||
@foreach ($genres as $genre)
|
||||
<a href="{{ route('mediahub.genres.show', ['id' => $genre->id]) }}" style="padding: 0 2px;">
|
||||
@@ -30,14 +29,13 @@
|
||||
<h2 class="text-bold"> {{ $genre->name }}</h2>
|
||||
<span style="background-color: #317aaf;"></span>
|
||||
<h2 style="font-size: 14px;">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tv-retro"></i> {{ $genre->tv->count() }} {{ __('mediahub.shows') }}
|
||||
<i class="{{ config('other.font-awesome') }} fa-tv-retro"></i> {{ $genre->tv_count }} {{ __('mediahub.shows') }}
|
||||
|
|
||||
<i class="{{ config('other.font-awesome') }} fa-film"></i> {{ $genre->movie->count() }} {{ __('mediahub.movies') }}
|
||||
<i class="{{ config('other.font-awesome') }} fa-film"></i> {{ $genre->movie_count }} {{ __('mediahub.movies') }}
|
||||
</h2>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $genres->links('partials.pagination') }}
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user