Skip to content

Commit

Permalink
Merge pull request #2857 from Laravel-Backpack/4.1
Browse files Browse the repository at this point in the history
4.1
  • Loading branch information
tabacitu authored May 21, 2020
2 parents 2ac1474 + 6228189 commit cbd4143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/views/crud/fields/select2.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- select2 -->
@php
$current_value = old($field['name']) ?? $field['value'] ?? $field['default'] ?? '';
$entity_model = new $field['model']();
$entity_model = $crud->model;
//if it's part of a relationship here we have the full related model, we want the key.
if (is_object($current_value) && is_subclass_of(get_class($current_value), 'Illuminate\Database\Eloquent\Model') ) {
Expand Down

0 comments on commit cbd4143

Please sign in to comment.