We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b30825e commit 7fbfc88Copy full SHA for 7fbfc88
1 file changed
app/Services/ProviderService.php
@@ -43,7 +43,7 @@ public function link ( int $storeId, int $userId = null ) {
43
$userId = $userId ?? (store_owner()?->store_id === $storeId ? store_owner_id() : 0);
44
if ( !$userId ) return notFoundFailed('user');
45
46
- return $this->firstOrCreate(['supplier_id' => $storeId], ['user_id' => $userId]);
+ return $this->updateOrCreate(['supplier_id' => $storeId], ['user_id' => $userId]);
47
48
}
49
public function apiLink ( array $params = [] ) {
0 commit comments