You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/DescribeFilamentResourceTool.php
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ public function extractRelationshipsInfo(Resource $resource): array
115
115
// Placeholder: Use manager class name as key.
116
116
$relationName = $manager->getRelationshipName();
117
117
$modelClass = $resource::getModel();
118
-
$modelInstance = new$modelClass();
118
+
$modelInstance = new$modelClass;
119
119
$relation = $modelInstance->$relationName();
120
120
121
121
$relationships[$relationName] = [
@@ -163,8 +163,8 @@ public function makeFilamentTranslatableContentDriver(): ?TranslatableContentDri
163
163
'type' => 'searchable_column',
164
164
'example' => [
165
165
'description' => 'Use string value to search within this column',
166
-
'values' => ['search term', 'partial match']
167
-
]
166
+
'values' => ['search term', 'partial match'],
167
+
],
168
168
])
169
169
->keyBy('name')
170
170
->all();
@@ -291,7 +291,7 @@ public function mapTableFilter(BaseFilter $filter): array
291
291
$baseInfo['example'] = [
292
292
'description' => 'Use true for yes, false for no, null for all',
293
293
'values' => [true, false, null],
294
-
'usage' => "Include as '{$filter->getName()}': true|false|null in your filters JSON"
294
+
'usage' => "Include as '{$filter->getName()}': true|false|null in your filters JSON",
295
295
];
296
296
} elseif ($filterinstanceof SelectFilter) {
297
297
$baseInfo['optionsSource'] = 'Dynamic/Callable';
@@ -305,24 +305,24 @@ public function mapTableFilter(BaseFilter $filter): array
305
305
'description' => 'Use array of option keys or single option key',
306
306
'values' => [
307
307
'single' => $exampleSingle,
308
-
'multiple' => $exampleMultiple
308
+
'multiple' => $exampleMultiple,
309
309
],
310
-
'usage' => "Include as '{$filter->getName()}': [" . implode(', ', array_map(fn($v) => "\"$v\"", $exampleMultiple)) . "] or '{$filter->getName()}': \"$exampleSingle\" in your filters JSON"
310
+
'usage' => "Include as '{$filter->getName()}': [".implode(', ', array_map(fn($v) => "\"$v\"", $exampleMultiple))."] or '{$filter->getName()}': \"$exampleSingle\" in your filters JSON",
311
311
];
312
312
} else {
313
313
$baseInfo['example'] = [
314
314
'description' => 'Use array of option values or single option value',
'usage' => "Include as '{$filter->getName()}': [\"option_value_1\", \"option_value_2\"] or '{$filter->getName()}': \"option_value\" in your filters JSON"
319
+
'usage' => "Include as '{$filter->getName()}': [\"option_value_1\", \"option_value_2\"] or '{$filter->getName()}': \"option_value\" in your filters JSON",
0 commit comments