Skip to content

Commit 1c305a9

Browse files
authored
remove showOnIndex method from JSON (#117)
1 parent 7e6c704 commit 1c305a9

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/JSON.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public function __construct($name, $fields, $attribute = null, $resolveCallback
7070

7171
$this->fields = collect();
7272

73-
foreach($fields as $field) {
74-
if($field instanceOf Panel){
75-
collect($field->data)->each(function($f) {
73+
foreach ($fields as $field) {
74+
if ($field instanceof Panel) {
75+
collect($field->data)->each(function ($f) {
7676
$this->fields->push($f);
7777
});
7878
} else {
@@ -95,18 +95,6 @@ public function panelTitleClasses($classes)
9595
return $this;
9696
}
9797

98-
/**
99-
* Whether the field should be shown on the index.
100-
*
101-
* @return $this
102-
*/
103-
public function showOnIndex()
104-
{
105-
$this->showOnIndex = true;
106-
107-
return $this;
108-
}
109-
11098
/**
11199
* Resolve the field's value.
112100
*
@@ -153,7 +141,7 @@ public function resolve($resource, $attribute = null)
153141
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
154142
{
155143
$this->fields->each(function ($field) use ($request, $model, $attribute) {
156-
$field->fillInto($request, $model, $attribute.'->'.$field->attribute, $attribute.'.'.$field->attribute);
144+
$field->fillInto($request, $model, $attribute . '->' . $field->attribute, $attribute . '.' . $field->attribute);
157145
});
158146
}
159147

0 commit comments

Comments
 (0)