src/ConcatenatesRelationships.php
protected function hasOneOrManyDeepRelationMethod(Relation $relation)
    {
        $classes = [
            BelongsTo::class,
            HasManyDeep::class,
            HasManyThrough::class,
            MorphOneOrMany::class,
            HasOneOrMany::class,
            MorphToMany::class,
            BelongsToMany::class,
        ];

        foreach ($classes as $class) {
            if ($relation instanceof $class) {
                return 'hasOneOrManyDeepFrom'.class_basename($class);
            }
        }

        throw new RuntimeException('This relationship is not supported.'); // @codeCoverageIgnore
    }
protected function hasOneOrManyDeepRelationMethod(Relation $relation)
    {
        $classes = [
            BelongsTo::class,
            HasManyDeep::class,
            HasManyThrough::class,
            MorphOneOrMany::class,
            HasOneOrMany::class,
            MorphToMany::class,
            BelongsToMany::class,
        ];

        foreach ($classes as $class) {
            if ($relation instanceof $class) {
                return 'hasOneOrManyDeepFrom'.class_basename($class);
            }
        }

        throw new RuntimeException('This relationship is not supported.'); // @codeCoverageIgnore
    }
protected function hasOneOrManyDeepRelationMethod ( Relation $ relation ) { $ classes = [ BelongsTo :: class , HasManyDeep :: class , HasManyThrough :: class , MorphOneOrMany :: class , HasOneOrMany :: class , MorphToMany :: class , BelongsToMany :: class , ] ; foreach ( $ classes as $ class ) { if ( $ relation instanceof $ class ) { return 'hasOneOrManyDeepFrom' . class_basename ( $ class ) ; } } throw new RuntimeException ( 'This relationship is not supported.' ) ; // @codeCoverageIgnore }
Get the relationship method name.

@param  \Illuminate\Database\Eloquent\Relations\Relation  $relation
@return string
Get the relationship method name .