src/Components/DbSchemaExtras.php
public function setSchemaRelatedExtras($extras)
    {
        if (empty($extras)) {
            return;
        }

        foreach ($extras as $extra) {
            if (!empty($table = array_get($extra, 'table')) &&
                !empty($name = array_get($extra, 'relationship'))
            ) {
                DbRelationshipExtras::updateOrCreate(
                    [
                        'service_id'   => $this->getServiceId(),
                        'table'        => $table,
                        'relationship' => $name
                    ],
                    array_only($extra,
                        [
                            'alias',
                            'label',
                            'description',
                            'always_fetch',
                            'flatten',
                            'flatten_drop_prefix',
                        ]
                    )
                );
            }
        }
    }
public function setSchemaRelatedExtras($extras)
    {
        if (empty($extras)) {
            return;
        }

        foreach ($extras as $extra) {
            if (!empty($table = array_get($extra, 'table')) &&
                !empty($name = array_get($extra, 'relationship'))
            ) {
                DbRelationshipExtras::updateOrCreate(
                    [
                        'service_id'   => $this->getServiceId(),
                        'table'        => $table,
                        'relationship' => $name
                    ],
                    array_only($extra,
                        [
                            'alias',
                            'label',
                            'description',
                            'always_fetch',
                            'flatten',
                            'flatten_drop_prefix',
                        ]
                    )
                );
            }
        }
    }
@param array $extras

@return void