@extends('layouts.app') @section('title', ' - Riwayat Pencarian') @section('content')
Berikut adalah daftar pencarian yang pernah Anda lakukan.
Anda belum pernah melakukan pencarian cafe. Mulai pencarian pertama Anda sekarang!
Tanggal Pencarian | Kriteria | Hasil Teratas | Aksi |
---|---|---|---|
{{ $history->created_at->format('d M Y') }} {{ $history->created_at->format('H:i') }} |
@php
$criteria = [];
if (!empty($history->weights)) {
foreach ($history->weights as $categoryId => $weight) {
if ($weight > 0) {
$category = \App\Models\Category::find($categoryId);
if ($category) {
$criteria[] = $category->name . ' (' . round(($weight / array_sum($history->weights) * 100), 0) . '%)';
}
}
}
}
@endphp
@if(count($criteria) > 0)
@foreach($criteria as $c)
{{ $c }}
@endforeach
@else
Tidak ada kriteria khusus
@endif
|
@if(!empty($history->results))
@php $count = 0; @endphp
@foreach($history->results as $cafeId => $result)
@if($count < 3)
@else
Tidak ada hasil
@endif
{{ $count + 1 }}
{{ $result['name'] ?? 'Cafe #'.$cafeId }}
({{ number_format($result['score'], 2) }})
@php $count++; @endphp
@endif
@endforeach
|
Detail |