From 4e19d4e8faf501cedef0bc83afbea1b207e5e375 Mon Sep 17 00:00:00 2001 From: Dmytro Kulyk Date: Tue, 20 Feb 2024 17:20:15 +0200 Subject: [PATCH] [10.x] Added getQualifiedMorphTypeName to MorphToMany (#50153) It is in addition to qualified names for MorphToMany relations. --- .../Database/Eloquent/Relations/MorphToMany.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php index 87b8e7816f9f..8cf113bd0f34 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php @@ -189,6 +189,16 @@ public function getMorphType() return $this->morphType; } + /** + * Get the fully qualified morph type for the relation. + * + * @return string + */ + public function getQualifiedMorphTypeName() + { + return $this->qualifyPivotColumn($this->morphType); + } + /** * Get the class name of the parent model. *