Skip to content

Commit

Permalink
Merge pull request #94 from danharrin/patch-1
Browse files Browse the repository at this point in the history
Use qualified primary key name to support relation managers with `fromTable()`
  • Loading branch information
pxlrbt authored Jul 5, 2023
2 parents e812cec + 7ad0c77 commit 771952c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Exports/ExcelExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ public function getModelClass(): ?string
public function hydrate($livewire = null, $records = null, $formData = null): static
{
$this->livewire = $livewire;
$this->modelKeyName = $this->getModelInstance()->getKeyName();
$this->recordIds = $records?->pluck($this->modelKeyName)->toArray() ?? [];
$this->modelKeyName = $this->getModelInstance()->getQualifiedKeyName();
$this->recordIds = $records?->pluck($this->getModelInstance()->getKeyName())->toArray() ?? [];

$this->formData = $formData;

Expand Down

0 comments on commit 771952c

Please sign in to comment.