Welcome Guest, Not a member yet? Register   Sign In
Error cloning Entities

Maybe i found a bug or maybe i made mistake. When i try to clone an entities model dont save unless i fill attributes manually BUT if i make d() i see attributes filled correctly. This is the code:
PHP Code:
$UserModel model(UserModel::class);

$oldEntry $UserModel->first();

$newEntry = clone $oldEntry;


//name is required and filled in old entry
//unless this it will get an error "name required"
 $newEntry->name 'ciccio';

Any Ideas ?

Theme © iAndrew 2016 - Forum software by © MyBB