Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
27 lines
703 B
PHP
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);
|
|
}),
|
|
];
|
|
}
|
|
}
|