Skip to content

Commit d6e5c9d

Browse files
authored
Merge pull request #4288 from Laravel-Backpack/fix-filters-from-different-namespaces
fix filters from custom namespace
2 parents a48958f + 855bfd4 commit d6e5c9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/Library/CrudPanel/CrudFilter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,15 @@ public function getViewWithNamespace()
145145
public function getNamespacedViewWithFallbacks()
146146
{
147147
$type = $this->type;
148+
$namespaces = config('backpack.crud.view_namespaces.filters');
149+
150+
if ($this->viewNamespace != 'crud::filters') {
151+
$namespaces = array_merge([$this->viewNamespace], $namespaces);
152+
}
148153

149154
return array_map(function ($item) use ($type) {
150155
return $item.'.'.$type;
151-
}, config('backpack.crud.view_namespaces.filters'));
156+
}, $namespaces);
152157
}
153158

154159
// ---------------------

0 commit comments

Comments
 (0)