Files
larablog/app/Filament/Resources/Attachments/Pages/EditAttachment.php
T
ak 263b98b218 Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
2026-08-12 01:15:38 +08:00

27 lines
703 B
PHP

<?php
declare(strict_types=1);
namespace App\Filament\Resources\Attachments\Pages;
use App\Domain\Media\AttachmentStorageService;
use App\Filament\Resources\Attachments\AttachmentResource;
use App\Models\Attachment;
use Filament\Actions\DeleteAction;
use Filament\Resources\Pages\EditRecord;
class EditAttachment extends EditRecord
{
protected static string $resource = AttachmentResource::class;
protected function getHeaderActions(): array
{
return [
DeleteAction::make()
->before(function (Attachment $record, AttachmentStorageService $storage): void {
$storage->deleteFromDisk($record);
}),
];
}
}