页面 · Laravilt
ReplicateAction
Duplicate a record with Eloquent's replicate().
php
Defaults: label "Replicate", icon Copy, color gray, confirmation required. Hidden when the user lacks replicate permission.
Exclude attributes
php
Hooks
Both callbacks receive the replica and the original record:
php
Redirect
php
API reference
| Method | Description |
|---|---|
excludeAttributes(array) | Attributes not copied |
beforeReplicaSaved(Closure) | Modify the replica before saving |
afterReplicaSaved(Closure) | Run after saving |
successRedirectUrl(Closure) | URL to open afterwards |