Lasttest 5.000 Personen: Skript, Ergebnis, N+1 in der Seitenliste behoben
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m10s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m8s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m26s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m28s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m31s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m13s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m10s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m8s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m26s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m28s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m31s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m13s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a94da32b98
commit
9ff319f647
7 changed files with 351 additions and 5 deletions
|
|
@ -122,6 +122,8 @@ class ContentPageResource extends Resource
|
|||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
// Unterseiten-Prüfung (Löschen-Knopf) in einer Abfrage statt je Zeile
|
||||
->modifyQueryUsing(fn ($query) => $query->withExists('children'))
|
||||
->defaultSort('path')
|
||||
->paginated([50, 100, 'all'])
|
||||
->columns([
|
||||
|
|
@ -158,7 +160,7 @@ class ContentPageResource extends Resource
|
|||
DeleteAction::make()
|
||||
->iconButton()
|
||||
->tooltip('Löschen')
|
||||
->visible(fn (Page $record) => ! $record->children()->exists())
|
||||
->visible(fn (Page $record) => ! ($record->children_exists ?? $record->children()->exists()))
|
||||
->before(fn (Page $record) => $record->files->each->delete()),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue