Closed X11 closed 7 years ago
Using the ->get()
method will return all uploads from the database and not lazy load them. The N+1 problem would have happend when you access them by property. F.e. user()->uploads
. Though this got me thinking and it does instead suffer from a N+1 problem when deleting the actual items from the database as it invalidates the user cache and issues a delete statement on each ->forceDelete()
.
This PR will add a new button in the user uploads page to delete all his uploads all at once. It will ask the user for confirmation to so it an user will not delete all his uploads by a mis-click or mistake.