Change sorting on graphs so that date is in date order
This commit is contained in:
parent
81b9ebfe6b
commit
e78e79a8f5
@ -77,13 +77,14 @@ class Domain extends Model
|
||||
->when($systems?->count(),function($query) use ($systems) { return $query->whereIn('fftn_id',$systems->pluck('addresses')->flatten()->pluck('id')->toArray()); })
|
||||
->where('datetime','>=',Carbon::now()->subMonths(self::STATS_MONTHS)->startOfMonth())
|
||||
->groupBy(['echoarea_id','echoareas.name','date'])
|
||||
->orderBy('echoareas.name')
|
||||
->orderBy('date')
|
||||
->orderBy('echoareas.name')
|
||||
->with(['echoarea'])
|
||||
->get();
|
||||
|
||||
if ($byarea)
|
||||
return $echostats
|
||||
->sortBy('name')
|
||||
->groupBy(['echoarea_id'])
|
||||
->map(function($item,$key) {
|
||||
return [
|
||||
|
Loading…
Reference in New Issue
Block a user