konnco/filament-safely-delete is a Laravel package.
It currently has 34 GitHub stars and 3.642 downloads on Packagist (latest version 0.3.2).
Install it with composer require konnco/filament-safely-delete.
Discover more Laravel packages by konnco
or browse all Laravel packages to compare alternatives.
Last updated

This plugin is intended for those of you who are worried about your data being accidentally deleted.
You can install the package via composer:
composer require konnco/filament-safely-delete
import the actions into the Resource page
use Konnco\FilamentSafelyDelete\Tables\Actions\RevertableDeleteAction;
class PostResource extends Resource
{
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('title'),
Tables\Columns\TextColumn::make('slug'),
Tables\Columns\TextColumn::make('body'),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
DeleteAction::make()
->usingField('title')
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
]);
}
}
You can also use to delete undo in your resource.
use Konnco\FilamentSafelyDelete\Tables\Actions\RevertableDeleteAction;
class PostResource extends Resource
{
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('title'),
Tables\Columns\TextColumn::make('slug'),
Tables\Columns\TextColumn::make('body'),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
RevertableDeleteAction::make()
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
]);
}
}
and implementing HasRevertableRecord traits in your ListRecords
use Konnco\FilamentSafelyDelete\Pages\Concerns\HasRevertableRecord;
class ListBlogPosts extends ListRecords
{
use HasRevertableRecord;
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
|
Franky So |
Herbert Maschke |
abangijal |
|
Franky So |
Herbert Maschke |
Abangijal |