الصفحات · Laravilt
DeleteAction
Soft delete a record with confirmation
Soft delete a record with confirmation dialog. Auto-hidden for trashed records.
Basic Usage
php
Default Configuration
- Icon: Trash2
- Color: destructive
- Requires Confirmation: Yes
- Performs soft delete
- Auto-hidden for trashed records
Custom Confirmation
php
Custom Icon
php
Without Confirmation
php
After Delete Redirect
php
Custom Delete Logic
php
Authorization
php
API Reference
| Method | Parameters | Description |
|---|---|---|
make() | ?string $name | Create action |
label() | string | Set label |
icon() | string | Set icon |
requiresConfirmation() | bool | Show confirmation |
modalHeading() | string | Modal title |
modalDescription() | string | Modal message |
action() | Closure | Custom delete logic |
successRedirectUrl() | string | Redirect after delete |
authorize() | Closure | Auth callback |