Skip to content

Conversation

sohrabafard
Copy link

With this change, we can run a callback per node. For example, we can have a progress bar.

public static function create(array $attributes = [], self $parent = null, callable $callbackForEachChild = null)
{
   ....
}

```
public static function create(array $attributes = [], self $parent = null, callable $callbackForEachChild = null)
{
   ....
}
```

$child->setRelation('parent', $instance);

if(isset($callback))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add braces as this is not PSR-2 compliant code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants