Laravel replicate(): Duplicate Eloquent Models Safely
DEV · 24.10.2026 · 02:26
"Duplicate this" buttons look easy: copy the row, save it, done. Then the first copy fails with a duplicate-key error, or the new post comes out already deleted, or it quietly carries over…