Skip to content

Commit

Permalink
Use latest() within notifications() (#41095)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshooper authored Feb 18, 2022
1 parent cef0acf commit fbd2ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Notifications/HasDatabaseNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait HasDatabaseNotifications
*/
public function notifications()
{
return $this->morphMany(DatabaseNotification::class, 'notifiable')->orderBy('created_at', 'desc');
return $this->morphMany(DatabaseNotification::class, 'notifiable')->latest();
}

/**
Expand Down

0 comments on commit fbd2ca3

Please sign in to comment.