@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | throw new \InvalidArgumentException("[$model] must be a valid model class"); |
120 | 120 | } |
121 | 121 | |
122 | - $this->options = function ($value) use ($model, $idField, $textField) { |
|
122 | + $this->options = function($value) use ($model, $idField, $textField) { |
|
123 | 123 | if (empty($value)) { |
124 | 124 | return []; |
125 | 125 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $resources[] = $value; |
137 | 137 | } |
138 | 138 | |
139 | - if (in_array(SoftDeletes::class,class_uses_deep($model))) |
|
139 | + if (in_array(SoftDeletes::class, class_uses_deep($model))) |
|
140 | 140 | $model = $model::withTrashed(); |
141 | 141 | |
142 | 142 | return $model::find($resources)->pluck($textField, $idField)->toArray(); |
@@ -136,8 +136,9 @@ |
||
136 | 136 | $resources[] = $value; |
137 | 137 | } |
138 | 138 | |
139 | - if (in_array(SoftDeletes::class,class_uses_deep($model))) |
|
140 | - $model = $model::withTrashed(); |
|
139 | + if (in_array(SoftDeletes::class,class_uses_deep($model))) { |
|
140 | + $model = $model::withTrashed(); |
|
141 | + } |
|
141 | 142 | |
142 | 143 | return $model::find($resources)->pluck($textField, $idField)->toArray(); |
143 | 144 | }; |