We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa6b8a commit aca6fa7Copy full SHA for aca6fa7
src/Filament/Resources/DocumentTypeResource.php
@@ -173,14 +173,15 @@ public static function table(Table $table): Table
173
Tables\Actions\DeleteBulkAction::make(),
174
])->iconButton(),
175
])
176
- ->checkIfRecordIsSelectableUsing(function (DocumentType|Model $record) {
+ ->checkIfRecordIsSelectableUsing(function (DocumentType | Model $record) {
177
$hasContent = $record->content()->withoutGlobalScopes([
178
SoftDeletingScope::class,
179
])->count() > 0;
180
if ($hasContent) {
181
// Disallow delete this document type if have content
182
return false;
183
}
184
+
185
return true;
186
})
187
->filters([
0 commit comments