@extends('Admin.layouts.app')
@section('content')
@foreach($chartList->chunk(10) as $chunkIndex => $recordChunk)
@php
$firstRecord = $recordChunk->first();
$bgColor = '';
if ($firstRecord->type == 1) {
$bgColor = 'background-color: #ffdddd;'; // Light Red for Type 1
} elseif ($firstRecord->type == 2) {
$bgColor = 'background-color: #ddffdd;'; // Light Green for Type 2
} elseif ($firstRecord->type == 3) {
$bgColor = 'background-color: #ddddff;'; // Light Blue for Type 3
} elseif ($firstRecord->type == 4) {
$bgColor = 'background-color: #e1b0e9;'; // Light Blue for Type 3
}
@endphp
@foreach($recordChunk as $record)
| {{ $record->number }} |
{{ $record->money }} |
@endforeach
@endforeach
@endsection