Soft Deletes
Livewire Tables supports soft deletes out of the box. If your model has the SoftDeletes
trait it will automatically add a dropdown to the table. With this dropdown, you will be able to:
- See records that have not been trashed (default)
- See all records, including trashed
- Only see trashed records
If your model has the SoftDeletes
trait, but you do not want the functionalities that come with it, you can disable it by overriding the hasSoftDeletes
method in your Livewire Table.
php
protected function hasSoftDeletes(): bool
{
return false;
}