src/RelationshipResourceFinder.php
protected function getRelationshipsThatMatchType($type)
    {
        return array_filter(
            $this->mapRelationshipsToIdAndData(),
            function ($relationship) use ($type) {
                $relationshipType = Arr::get($relationship, 'type');

                return Str::snakeCase($type) === Str::snakeCase($relationshipType);
            }
        );
    }
protected function getRelationshipsThatMatchType($type)
    {
        return array_filter(
            $this->mapRelationshipsToIdAndData(),
            function ($relationship) use ($type) {
                $relationshipType = Arr::get($relationship, 'type');

                return Str::snakeCase($type) === Str::snakeCase($relationshipType);
            }
        );
    }
protected function getRelationshipsThatMatchType ( $ type ) { return array_filter ( $ this -> mapRelationshipsToIdAndData ( ) , function ( $ relationship ) use ( $ type ) { $ relationshipType = Arr :: get ( $ relationship , 'type' ) ; return Str :: snakeCase ( $ type ) === Str :: snakeCase ( $ relationshipType ) ; } ) ; }
Get all the relationships that their type matches the given type.

@param string $type
@return array|mixed
Get all the relationships that their type matches the given type .