mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 20:47:56 +08:00
update
This commit is contained in:
@ -43,28 +43,5 @@ class V2boardCache extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->setMonthIncome();
|
||||
$this->setMonthRegisterTotal();
|
||||
}
|
||||
|
||||
private function setMonthIncome()
|
||||
{
|
||||
Cache::put(
|
||||
'month_income',
|
||||
Order::where('created_at', '>=', strtotime(date('Y-m-1')))
|
||||
->where('created_at', '<', time())
|
||||
->where('status', '3')
|
||||
->sum('total_amount')
|
||||
);
|
||||
}
|
||||
|
||||
private function setMonthRegisterTotal()
|
||||
{
|
||||
Cache::put(
|
||||
'month_register_total',
|
||||
User::where('created_at', '>=', strtotime(date('Y-m-1')))
|
||||
->where('created_at', '<', time())
|
||||
->count()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user