Skip to content

error if relation with same key exists in the resource  #5

Description

@ibrahem-kamal

hi , because the chain package only appears in the form view . i have this code

      BelongsTo::make('User','user')->exceptOnForms(),

  Chain::as('user', function () {
        return [
          Select::make('User', 'user_id')
            ->options(
              \App\User::pluck('first_name', 'id')->toArray()
            )
        ];
      }),

but because the relation is the same key the package tries to chain it which result in the following error

Method Laravel\Nova\Fields\BelongsTo::resolveFields does not exist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions