Fix date for graph, problem introduced in 3f5668
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m48s
Create Docker Image / Final Docker Image Manifest (push) Successful in 12s

This commit is contained in:
Deon George 2024-06-18 20:12:36 +09:30
parent ef2e208fde
commit 665cc7720c

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\Gate;
@ -25,7 +26,7 @@ class DomainController extends Controller
->sortBy('date') ->sortBy('date')
->groupBy('date') ->groupBy('date')
->transform(function($item,$key) { return [ ->transform(function($item,$key) { return [
'x'=>\Carbon\Carbon::createFromFormat('Y-m-d',$key)->timestamp, 'x'=>Carbon::createFromFormat('Y-m-d',$key)->timestamp*1000,
'y'=>$item->sum('count')]; } ) 'y'=>$item->sum('count')]; } )
->values(); ->values();
} }