From e97122ea4b6cd904fb1fca38f8f91a8fa0ef1520 Mon Sep 17 00:00:00 2001 From: Lionel Guichard Date: Tue, 5 Nov 2024 10:38:13 +0100 Subject: [PATCH] Fix Rule unique slug url use morph class (#1983) --- .../src/Support/Resources/Pages/ManageUrlsRelatedRecords.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/admin/src/Support/Resources/Pages/ManageUrlsRelatedRecords.php b/packages/admin/src/Support/Resources/Pages/ManageUrlsRelatedRecords.php index 3d8cc834d0..d644f000e1 100644 --- a/packages/admin/src/Support/Resources/Pages/ManageUrlsRelatedRecords.php +++ b/packages/admin/src/Support/Resources/Pages/ManageUrlsRelatedRecords.php @@ -55,7 +55,7 @@ public function form(Form $form): Form ignoreRecord: true, modifyRuleUsing: function (Unique $rule, callable $get) { return $rule - ->where('element_type', static::$model) + ->where('element_type', (new static::$model)->getMorphClass()) ->where('language_id', $get('language_id')); } )