filamentphp/filament · error · LogicException
Record arrays must have a unique [{ArrayRecord::getKeyName()
Error message
Record arrays must have a unique [{ArrayRecord::getKeyName()}] entry for identification. What it means
Error "Record arrays must have a unique [{ArrayRecord::getKeyName()}] entry for identification." thrown in filamentphp/filament.
Source
Thrown at packages/actions/src/Concerns/InteractsWithRecord.php:188
if (filled($title = $this->getTable()?->getRecordTitle($record))) {
return $title;
}
}
if ($this instanceof Action && filled($title = $this->getHasActionsLivewire()?->getDefaultActionRecordTitle($this))) {
return $title;
}
return $this->getModelLabel();
}
/**
* @param Model | array<string, mixed> $record
*/
public function resolveRecordKey(Model | array $record): ?string
{
if (is_array($record)) {
return strval($record[ArrayRecord::getKeyName()] ?? throw new LogicException('Record arrays must have a unique [' . ArrayRecord::getKeyName() . '] entry for identification.'));
}
$key = $record->getKey();
if (blank($key)) {
return null;
}
return strval($key);
}
public function getCustomRecordTitle(?Model $record = null): ?string
{
$record ??= $this->getRecord();
$title = $this->evaluate(
$this->recordTitle,
namedInjections: [View on GitHub (pinned to 53483fa934)
When it happens
Trigger: Thrown at packages/actions/src/Concerns/InteractsWithRecord.php:188 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17).
Data as JSON: /api/errors/1604ccb77b6acf5e.
Report an issue: GitHub.