@extends('layouts.app') @section('title', $game->name) @section('content')

{{ $game->name }}

@if($game->rating)
{{ number_format($game->rating, 0) }}
@for($i = 1; $i <= 5; $i++) @endfor
{{ number_format($game->rating_count) }} ratings
@endif @if($game->first_release_date)
{{ $game->first_release_date->format('Y') }}
@endif
@foreach($game->genres()->limit(3)->get() as $genre) {{ $genre->name }} @endforeach
@if($game->screenshots->count() > 0 || $game->videos->count() > 0) @endif

About This Game

@if($game->summary)

{{ $game->summary }}

@endif @if($game->storyline)
Storyline

{{ $game->storyline }}

@endif

Reviews

@auth Write Review @endauth
@if($reviews->isEmpty())

No reviews yet. Be the first to review this game!

@auth Write a Review @else Login to Write a Review @endauth
@else @if($game->rating)
{{ number_format($game->rating, 1) }} /100
@for($i = 1; $i <= 5; $i++) @endfor
{{ number_format($game->rating_count) }} reviews
Rating Distribution
@foreach(array_slice($ratingDistribution, 0, 5) as $rating)
{{ $rating['range'] }} stars
{{ number_format($rating['percentage'], 0) }}%
@endforeach
@endif
@foreach($reviews->take(5) as $review)
{{ $review->user->name }}
{{ $review->created_at->diffForHumans() }}
{{ $review->rating }}/10
@if($review->recommended)
Recommended
@endif
{!! nl2br(e(Str::limit($review->content, 300))) !!} @if(strlen($review->content) > 300) Read more @endif
@endforeach
@if($reviews->count() > 5) @endif @endif
{{ $game->name }} @auth @else Login to Add to List @endauth
Release Date {{ $game->first_release_date ? $game->first_release_date->format('F j, Y') : 'TBA' }}
@if($game->platforms()->count() > 0)
Platforms
@foreach($game->platforms()->get() as $platform) {{ $platform->name }} @endforeach
@endif @if($game->genres()->count() > 0)
Genres
@foreach($game->genres()->get() as $genre) {{ $genre->name }} @endforeach
@endif @if($game->url)
Official Website Visit Website
@endif @if($game->rating)
Community Rating
{{ number_format($game->rating, 1) }}/100 ({{ number_format($game->rating_count) }} votes)
@endif
@if($game->similar_games->count() > 0) @endif @if($game->dlcs->count() > 0)
DLC & Expansions
@foreach($game->dlcs->take(4) as $dlc) {{ $dlc->name }}
{{ Str::limit($dlc->name, 40) }}
Additional Content
@endforeach
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush