@php use App\Models\Game; use App\Models\GameList; use App\Models\Platform; use Illuminate\Support\Str; @endphp

Search Results

@foreach ($games as $game) @php $gameName = str_replace('/', '_', str_replace(' ', '_', $game->name)); $platform = $game->platform()->get()[0]->name; $averageRating = round(GameList::whereGameId($game->id)->avg('rating') * 2) / 2; @endphp
{{ $game->name }} {{ $platform }}
@if ($game->alt_titles) @php $altTitles = str_replace('|', ', ', $game->alt_titles); @endphp Alternative Titles: {{ $altTitles }} @endif
@php while ($averageRating > 0) { if ($averageRating == 0.5) { echo '
'; $averageRating = $averageRating - 0.5; } else { echo '
'; $averageRating--; } } @endphp

{{ Str::words($game->description, 50) }}

{{--
120
15
--}}
@endforeach
{{ $games->links('partials.general._pagination') }}
@if (Auth::check()) {{ theme()->getView('partials/general/_donate-block') }} @endif {{ theme()->getView('partials/general/_recent-user-updates-block') }} {{ theme()->getView('partials/general/_most-popular-games-block') }}