Skip to content

Commit fbd2ca3

Browse files
authored
Use latest() within notifications() (#41095)
1 parent cef0acf commit fbd2ca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Notifications/HasDatabaseNotifications.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trait HasDatabaseNotifications
1111
*/
1212
public function notifications()
1313
{
14-
return $this->morphMany(DatabaseNotification::class, 'notifiable')->orderBy('created_at', 'desc');
14+
return $this->morphMany(DatabaseNotification::class, 'notifiable')->latest();
1515
}
1616

1717
/**

0 commit comments

Comments
 (0)