From 0a785af19b201167a9cebd423c6653226bafee58 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Wed, 21 Feb 2024 18:07:44 +0800 Subject: [PATCH] fix `resolveSubject` static method --- src/Support/Utils.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Support/Utils.php b/src/Support/Utils.php index 7045423..cc4dbc5 100644 --- a/src/Support/Utils.php +++ b/src/Support/Utils.php @@ -1441,16 +1441,15 @@ public static function resolveSubject(string $publicId) { $resourceMap = [ 'store' => 'storefront:store', - 'product' => 'storefront:store', - 'order' => 'order', - 'customer' => 'contact', - 'contact' => 'contact', + 'product' => 'storefront:product', + 'order' => 'fleet-ops:order', + 'customer' => 'fleet-ops:contact', + 'contact' => 'fleet-ops:contact', ]; list($type) = explode('_', $publicId); $modelNamespace = static::getMutationType($resourceMap[$type]); - if ($modelNamespace) { return app($modelNamespace)->where('public_id', $publicId)->first(); }