Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ibrahem-kamal opened this issue Aug 10, 2021 · 0 comments
Open

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

ibrahem-kamal opened this issue Aug 10, 2021 · 0 comments

Comments

@ibrahem-kamal
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant