cloner icon indicating copy to clipboard operation
cloner copied to clipboard

A trait for Laravel Eloquent models that lets you clone a model and it's relationships, including files. Even to another database.

Results 18 cloner issues
Sort by recently updated
recently updated
newest added

How i can add nested relations in `$cloneable_relations`? now i use this `protected $cloneable_relations = [ 'domains', 'technology_experience.technology.technology_category', 'technology_experience.category', 'projects', 'projects.roles', 'foreign_languages', 'certifications' ];`

Welcome, I have installed this awesome package, then I used `Cloneable` trait in `User` model. I have `Post` model also and every user **hasMany** posts and every post **belongsTo** one...

Is there any way we can customize some fields while cloning. As mention on https://github.com/BKWLD/cloner/issues/18 We can customize the fields with `onCloning` method, But is there any way we can...

I want to pass new DYNAMIC value in child clone. How i can do this?

i dont know if i understand it wrong, but onCloned is called to early and also it should have the new model as an argument. When i clone a model...

In Laravel 7 when i call the duplicate method the error happen: > Non-static method Illuminate\Foundation\Application::make() should not be called statically The error happen because the App used note the...

When duplicating an attachment, the attachment of the clone is used as a reference (line 92). https://github.com/BKWLD/cloner/blob/d9c92a1e939805eb51119d63ce6da7aa5680449c/src/Cloner.php#L89-L95 This probably doesn't matter in most cases, but it does with the attachment...

Hi, I'm using Eloquent ouside Laravel, and I found this useful package. In `composer.json` there are no dependency on the laravel framework, only on `illuminate/support`, but in `Cloneable.php` there's a...

I want to clone a parent model that has relations like these: `relation_1` => hasMany `relation_2` => hasMany `relation_3` => hasMany The `relation_3` itself has polymorphic relation with `relation_1` or...