diff --git a/src/Concerns/HandlesRelationStandardOperations.php b/src/Concerns/HandlesRelationStandardOperations.php index 1185ba0..a01dd4d 100644 --- a/src/Concerns/HandlesRelationStandardOperations.php +++ b/src/Concerns/HandlesRelationStandardOperations.php @@ -257,11 +257,13 @@ public function search(Request $request, $parentKey) * Create new relation resource. * * @param Request $request - * @param int|string $parentKey + * @param array $args * @return Resource */ - public function store(Request $request, $parentKey) + public function store(Request $request, ...$args) { + $parentKey = $this->keyResolver->resolveRelationOperationParentKey($request, $args); + try { $this->startTransaction(); $result = $this->storeWithTransaction($request, $parentKey);