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

Your email address will not be published. Required fields are marked *

Fork us on GitHub