@extends('admin.layouts.app') @section('title', 'Manajemen Game') @section('content') @php $isTrash = request()->boolean('trash'); @endphp
| Game | Developer | Publisher | Genre | Harga | Rilis | Aksi |
|---|---|---|---|---|---|---|
|
@if($game->thumbnail_url)
N/A
@endif
{{ $game->title }}
@if($game->detail && $game->detail->discount > 0)
-{{ $game->detail->discount }}%
@endif
|
{{ $game->developer->name ?? '-' }} | {{ $game->publisher->name ?? '-' }} |
@foreach($game->genres->take(2) as $genre)
{{ $genre->name }}
@endforeach
@if($game->genres->count() > 2)
+{{ $game->genres->count() - 2 }}
@endif
|
@php
$disc = $game->detail->discount ?? 0;
$orig = $game->price;
$final = $disc > 0 ? $orig * (1 - $disc / 100) : $orig;
@endphp
@if($orig == 0)
Gratis
@elseif($disc > 0)
Rp {{ number_format($orig, 0, ',', '.') }}
Rp {{ number_format($final, 0, ',', '.') }}
|
{{ $game->release_date ? $game->release_date->format('d M Y') : '-' }} | |
|
{{ $isTrash ? 'Tidak ada game terhapus.' : 'Tidak ada game yang ditemukan.' }} |
||||||
Total: {{ $games->total() }} {{ $isTrash ? 'game terhapus' : 'game' }}
{{ $games->links() }}