Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Commit 231ca1f

Browse files
committed
Update HasResource.php
1 parent 557017c commit 231ca1f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Table/HasResource.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ public function isNotEmpty(): bool
136136
return !$this->isEmpty();
137137
}
138138

139+
/**
140+
* Setter for the primary key of the resource.
141+
*
142+
* @param string $key
143+
* @return self
144+
*/
145+
public function primaryKey(string $key): self
146+
{
147+
$this->primaryKey = $key;
148+
149+
return $this;
150+
}
151+
139152
/**
140153
* Returns the primary key of the given item.
141154
*

0 commit comments

Comments
 (0)