protected function getRelationMappedMorphClass($type)
    {
        $map = Relation::morphMap();

        if (empty($map)) {
            return $type;
        }

        return array_get($map, $type, ltrim($type, '\\'));
    }
protected function getRelationMappedMorphClass($type)
    {
        $map = Relation::morphMap();

        if (empty($map)) {
            return $type;
        }

        return array_get($map, $type, ltrim($type, '\\'));
    }
protected function getRelationMappedMorphClass ( $ type ) { $ map = Relation :: morphMap ( ) ; if ( empty ( $ map ) ) { return $ type ; } return array_get ( $ map , $ type , ltrim ( $ type , '\\' ) ) ; }
Returns morph relation class string for a morph relation type, or type if already a class.

@param string $type
@return string
Returns morph relation class string for a morph relation type or type if already a class .