@@ -97,13 +97,13 @@ |
||
97 | 97 | */ |
98 | 98 | public function model($model, $idField = 'id', $textField = 'name') |
99 | 99 | { |
100 | - $this->options = function ($resource) use ($model, $idField, $textField) { |
|
100 | + $this->options = function($resource) use ($model, $idField, $textField) { |
|
101 | 101 | if (null == $resource) { |
102 | 102 | return []; |
103 | 103 | } |
104 | 104 | |
105 | 105 | if (is_array($resource) && !empty($resource) && isset($resource[0]['id'])) { |
106 | - $resource = array_map(function ($res) { |
|
106 | + $resource = array_map(function($res) { |
|
107 | 107 | return $res['id']; |
108 | 108 | }, $resource); |
109 | 109 | } elseif (is_array($resource) && !empty($resource) && isset($resource['id'])) { |
@@ -198,13 +198,13 @@ |
||
198 | 198 | */ |
199 | 199 | public function model($model, $idField = 'id', $textField = 'name') |
200 | 200 | { |
201 | - $this->options = function ($resource) use ($model, $idField, $textField) { |
|
201 | + $this->options = function($resource) use ($model, $idField, $textField) { |
|
202 | 202 | if (null == $resource) { |
203 | 203 | return []; |
204 | 204 | } |
205 | 205 | |
206 | 206 | if (is_array($resource) && !empty($resource) && isset($resource[0]['id'])) { |
207 | - $resource = array_map(function ($res) { |
|
207 | + $resource = array_map(function($res) { |
|
208 | 208 | return $res['id']; |
209 | 209 | }, $resource); |
210 | 210 | } elseif (is_array($resource) && !empty($resource) && isset($resource['id'])) { |