Skip to content

Commit 36c26b2

Browse files
committed
Hide key from index and details if in hideen
1 parent 67601d9 commit 36c26b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Repositories/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ protected function getType(RestifyRequest $request): ?string
670670

671671
protected function getShowId(RestifyRequest $request): ?string
672672
{
673-
return $this->resource->getKey();
673+
return collect($this->resource->getHidden())->contains($this->resource->getKeyName()) ? null : $this->resource->getKey();
674674
}
675675

676676
public function jsonSerialize()

0 commit comments

Comments
 (0)