Fix seenby sort order, with flatten domains

This commit is contained in:
Deon George 2023-09-19 17:28:25 +10:00
parent eebe8a159d
commit 11f9adf11a
2 changed files with 9 additions and 1 deletions

View File

@ -80,6 +80,14 @@ class Address extends Model
->orderBy('point_id'); ->orderBy('point_id');
} }
public function scopeFTN2DOrder($query)
{
return $query
->orderBy('host_id')
->orderBy('node_id')
->orderBy('point_id');
}
/* RELATIONS */ /* RELATIONS */
/** /**

View File

@ -138,7 +138,7 @@ final class Echomail extends Model implements Packet
public function seenby() public function seenby()
{ {
return $this->belongsToMany(Address::class,'echomail_seenby') return $this->belongsToMany(Address::class,'echomail_seenby')
->ftnOrder(); ->FTN2DOrder();
} }
public function path() public function path()