@@ -170,8 +170,8 @@ |
||
170 | 170 | { |
171 | 171 | // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful |
172 | 172 | if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\Relation')) { |
173 | - foreach ($this->{$action.'Relations'} as $relationship => $method) { |
|
174 | - if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\'.$relationship)) { |
|
173 | + foreach ($this->{$action . 'Relations'} as $relationship => $method) { |
|
174 | + if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\' . $relationship)) { |
|
175 | 175 | $this->model->$key()->$method($value); |
176 | 176 | |
177 | 177 | return; |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | * Create a new collection. |
34 | 34 | * |
35 | 35 | * @param mixed $items |
36 | + * @param ModelAdmin $modelManager |
|
36 | 37 | * |
37 | 38 | * @return void |
38 | 39 | */ |
@@ -49,7 +50,7 @@ discard block |
||
49 | 50 | * Attempt to reformat the current attribute items array |
50 | 51 | * into the most usable format (an Attribute Collection). |
51 | 52 | * |
52 | - * @return void |
|
53 | + * @return AttributeCollection |
|
53 | 54 | */ |
54 | 55 | public function formatFields() |
55 | 56 | { |