Skip to content

Commit

Permalink
Update Entity.php
Browse files Browse the repository at this point in the history
Replace array_pull helper to Illuminate\Support\Arr::pull for Laravel 6 support
  • Loading branch information
N1ebieski authored Oct 22, 2019
1 parent 7a97e6f commit fa8a2bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Franzose/ClosureTable/Models/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Franzose\ClosureTable\Extensions\QueryBuilder;
use Franzose\ClosureTable\Contracts\EntityInterface;
use Franzose\ClosureTable\Extensions\Collection;
use Illuminate\Support\Arr;

/**
* Basic entity class.
Expand Down Expand Up @@ -1159,7 +1160,7 @@ public static function createFromArray(array $tree, EntityInterface $parent = nu
$entities = [];

foreach ($tree as $item) {
$children = array_pull($item, $childrenRelationIndex);
$children = Arr::pull($item, $childrenRelationIndex);

/**
* @var Entity $entity
Expand Down

0 comments on commit fa8a2bb

Please sign in to comment.