MIF_HomsinNIME31231582/storage/framework/views/a7e6b4ca967fba6369c160e7fc9...

66 lines
2.4 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<title><?php echo e($title); ?></title>
<style>
body { font-family: Arial, sans-serif; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
.header { text-align: center; margin-bottom: 30px; }
.stats { margin-bottom: 20px; }
.positive { color: green; }
.negative { color: red; }
</style>
</head>
<body>
<div class="header">
<h1><?php echo e($title); ?></h1>
<p>Tanggal: <?php echo e($date); ?></p>
<p>Diekspor oleh: <?php echo e(auth()->user()->name ?? 'Admin'); ?></p>
</div>
<div class="stats">
<h3>Statistik Sentimen</h3>
<table>
<tr>
<th>Total Data</th>
<td><?php echo e($totalData); ?></td>
</tr>
<tr>
<th>Positif</th>
<td class="positive"><?php echo e($positif); ?> (<?php echo e(number_format(($positif / $totalSafe) * 100, 1)); ?>%)</td>
</tr>
<tr>
<th>Negatif</th>
<td class="negative"><?php echo e($negatif); ?> (<?php echo e(number_format(($negatif / $totalSafe) * 100, 1)); ?>%)</td>
</tr>
</table>
</div>
<h3>Data Review</h3>
<table>
<thead>
<tr>
<th>No</th>
<th>Review</th>
<th>Score</th>
<th>Sentimen</th>
<th>Tanggal</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $dataset; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $review): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($index + 1); ?></td>
<td><?php echo e($review->review); ?></td>
<td><?php echo e($review->score); ?></td>
<td><?php echo e(ucfirst($review->sentiment)); ?></td>
<td><?php echo e($review->created_at->format('d/m/Y')); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</body>
</html><?php /**PATH C:\laragon\www\sentiment-dashboard-slearn\resources\views/pdf/report.blade.php ENDPATH**/ ?>