sleeping-owl / admin

Administrative interface builder for Laravel
http://sleeping-owl.github.io/
MIT License
503 stars 259 forks source link

Error after copying record with image #280

Open crazyclir opened 8 years ago

crazyclir commented 8 years ago

Hi, I'm really admiring your work. Thanks for such great tool. But I noticed one problem - I've made a custom action for making a duplicate of existing record:

Column::action('copy', 'Copy this Layout')->icon('fa-files-o')->style('short')->callback(function($instance){ Layouts::find($instance->id)->replicate()->save(); });

When I make a copy of a record that has uploaded image and then change an image in either original image or copied one, I lose image on other record.

I've fixed this by changing data in image field, while copying. But I think you may habe better solution.