Skip to content

Commit

Permalink
Fix belongs-to-many failing with ID on pivot table
Browse files Browse the repository at this point in the history
  • Loading branch information
emptynick committed Nov 9, 2021
1 parent 2464835 commit 8c3c1dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/views/formfields/relationship.blade.php
Expand Up @@ -178,7 +178,7 @@ class="form-control select2-ajax @if(isset($options->taggable) && $options->tagg
$options->related_pivot_key ?? null,
$options->parent_key ?? null,
$options->key
)->pluck($options->key);
)->pluck($options->table.'.'.$options->key);
}
$selected_keys = old($relationshipField, $selected_keys);
$selected_values = app($options->model)->whereIn($options->key, $selected_keys)->pluck($options->label, $options->key);
Expand Down

0 comments on commit 8c3c1dd

Please sign in to comment.