Fixed graph order

Explicit ordering by time was showing the results the wrong way around
This commit is contained in:
Henry Whitaker
2020-04-21 23:41:09 +01:00
parent cfa6dc43ca
commit 8035d51bf5
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@@ -10,3 +10,5 @@ Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
.vscode/

View File

@@ -40,7 +40,7 @@ class SpeedtestController extends Controller
} }
$data = Speedtest::where('created_at', '>=', Carbon::now()->subDays($days)) $data = Speedtest::where('created_at', '>=', Carbon::now()->subDays($days))
->orderBy('created_at', 'desc') ->orderBy('created_at', 'asc')
->get(); ->get();
return response()->json([ return response()->json([