Laravel Vapor - New UI for admin to download reports

This commit is contained in:
Dillon Ngo
2024-10-04 01:55:26 +08:00
parent 1f8351486f
commit 1606bc7426
2 changed files with 2 additions and 2 deletions
@@ -47,7 +47,7 @@ class ContainersSheet implements WithHeadings, WithHeadingRow, WithMapping, Shou
public function query()
{
return Container::query()
->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()]);
->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()]); //Limit, 'expensive' query
}
/**
@@ -55,7 +55,7 @@ class PackingListsSheet implements WithHeadings, WithHeadingRow, WithMapping, Sh
{
$packingLists = PackingList::where('status', '=', 2)
->whereIn('type', [PackingListType::WAREHOUSE_RECEIVE_LIST, PackingListType::SHIPPING_PACKING_LIST])
->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()])
->whereBetween('created_at', [Carbon::now()->subMonths(3), Carbon::now()]) //Limit, 'expensive' query
->get();
return $packingLists->filter(function ($packingList) {