Skip to content

Commit

Permalink
Order by occured_at
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Sep 27, 2024
1 parent d76c8e5 commit 177166a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -184,4 +184,4 @@ public function getStatusAttribute(): string
return __('Unsent');
}
}
}
}

0 comments on commit 177166a

Please sign in to comment.