From 665cc7720cd8521a8e62770240d747b499a6afde Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 18 Jun 2024 20:12:36 +0930 Subject: [PATCH] Fix date for graph, problem introduced in 3f5668 --- app/Http/Controllers/DomainController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index da661c1..9f85650 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Gate; @@ -25,7 +26,7 @@ class DomainController extends Controller ->sortBy('date') ->groupBy('date') ->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')]; } ) ->values(); }