Fix date for graph, problem introduced in 3f5668
This commit is contained in:
parent
ef2e208fde
commit
665cc7720c
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user