Well, we couldn’t figure it out for a while then, suddenly it was clear that PHP allows for a new self directive.
foreach($array as $item){ $entity = new self; $entity->name = $item->name; $entity->save(); }
Well, we couldn’t figure it out for a while then, suddenly it was clear that PHP allows for a new self directive.
foreach($array as $item){ $entity = new self; $entity->name = $item->name; $entity->save(); }
Leave a Reply