From 177166afb4564504c461a8d8087b06164b9eab18 Mon Sep 17 00:00:00 2001 From: Baspa Date: Fri, 27 Sep 2024 15:43:03 +0200 Subject: [PATCH] Order by occured_at --- src/Models/Mail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Mail.php b/src/Models/Mail.php index bc55cdc..37571a3 100644 --- a/src/Models/Mail.php +++ b/src/Models/Mail.php @@ -114,7 +114,7 @@ public function attachments(): HasMany public function events(): HasMany { - return $this->hasMany(config('mails.models.event'))->orderBy('created_at', 'desc'); + return $this->hasMany(config('mails.models.event'))->orderBy('occured_at', 'desc'); } public function scopeResent(Builder $query): Builder @@ -184,4 +184,4 @@ public function getStatusAttribute(): string return __('Unsent'); } } -} \ No newline at end of file +}