generated from liutk/owl-admin-base
Update
parent
9878a1fc5c
commit
4dc454bd8a
|
|
@ -16,9 +16,9 @@ class StatisticsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function dashboard(Request $request, StatisticService $statisticService): array
|
public function dashboard(Request $request, StatisticService $statisticService): array
|
||||||
{
|
{
|
||||||
$query = Ledger::filter(
|
$input = $this->defaultFilterInput($request);
|
||||||
$this->defaultFilterInput($request), LedgerFilter::class
|
|
||||||
);
|
$query = Ledger::filter($input, LedgerFilter::class);
|
||||||
|
|
||||||
// 昨天
|
// 昨天
|
||||||
$yesterday = Carbon::yesterday();
|
$yesterday = Carbon::yesterday();
|
||||||
|
|
@ -52,7 +52,9 @@ class StatisticsController extends Controller
|
||||||
],
|
],
|
||||||
// 近30天趋势数据
|
// 近30天趋势数据
|
||||||
'trend_data_of_30days' => $statisticService->ledgerTrends(
|
'trend_data_of_30days' => $statisticService->ledgerTrends(
|
||||||
$yesterday->copy()->subDays(29), $yesterday->copy()
|
$yesterday->copy()->subDays(29),
|
||||||
|
$yesterday->copy(),
|
||||||
|
$input,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue