From 3271233fbd6f3bebce1af28dc93c816d49ca751a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=87ak=C4=B1rel?= Date: Sun, 8 Dec 2019 20:45:11 +0300 Subject: [PATCH] Fix a minor bug about getting class name of the bulk actions for modules --- app/Http/ViewComposers/Index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/ViewComposers/Index.php b/app/Http/ViewComposers/Index.php index 3e971e7ee..33794faf6 100644 --- a/app/Http/ViewComposers/Index.php +++ b/app/Http/ViewComposers/Index.php @@ -38,9 +38,10 @@ class Index if (Str::contains($view_name, '::')) { $names = explode('::', $view_name); - $params = explode('.', $view_name); + $params = explode('.', $names[1]); - $type = $params[0]; + $group = $params[0]; + $type = $params[1]; // Check is module $module = module($names[0]); @@ -52,7 +53,7 @@ class Index } if ($module instanceof \Akaunting\Module\Module) { - $class = 'Modules\\' . $module->getStudlyName() . '\BulkActions\\' . ucfirst($type); + $class = 'Modules\\' . $module->getStudlyName() . '\BulkActions\\' . ucfirst($group) . '\\' . ucfirst($type); } else { $class = 'App\BulkActions\\' . ucfirst($group) . '\\' . ucfirst($type); }