Skip to content

Commit

Permalink
Update Table.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Apr 11, 2021
1 parent 767529a commit a1b5567
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/tables/src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,22 +212,20 @@ public function recordActions($actions)

public function pushRecordActions($actions)
{
$this->recordActions = collect($this->recordActions)
->push(
collect(value($actions))->map(fn ($action) => $action->table($this))
)
->toArray();
$this->recordActions = array_merge(
$this->recordActions,
collect(value($actions))->map(fn ($action) => $action->table($this))->toArray(),
);

return $this;
}

public function prependRecordActions($actions)
{
$this->recordActions = collect($this->recordActions)
->prepend(
collect(value($actions))->map(fn ($action) => $action->table($this))
)
->toArray();
$this->recordActions = array_merge(
collect(value($actions))->map(fn ($action) => $action->table($this))->toArray(),
$this->recordActions,
);

return $this;
}
Expand Down

0 comments on commit a1b5567

Please sign in to comment.