mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 00:50:32 +00:00
Update AdminPanelProvider.php
This commit is contained in:
parent
29c4bf743b
commit
723f0f9201
1 changed files with 5 additions and 4 deletions
|
@ -107,15 +107,16 @@ class AdminPanelProvider extends PanelProvider
|
|||
$defaultColor = Color::hex(setting('general.brand_primary_color'));
|
||||
}
|
||||
$findModules = Module::where('installed', 1)->get();
|
||||
|
||||
if ($findModules->count() > 0) {
|
||||
foreach ($findModules as $module) {
|
||||
$modulePathClusters = module_path($module->name, 'Filament/Clusters');
|
||||
$modulePathClusters = module_path($module->name, 'App/Filament/Clusters');
|
||||
if (is_dir($modulePathClusters)) {
|
||||
$panel->discoverClusters(in: $modulePathClusters, for: 'Modules\\' . $module->name . '\\Filament\\Clusters');
|
||||
$panel->discoverClusters(in: $modulePathClusters, for: 'Modules\\' . $module->name . '\\App\\Filament\\Clusters');
|
||||
}
|
||||
$modulePathPages = module_path($module->name, 'Filament/Pages');
|
||||
$modulePathPages = module_path($module->name, 'App/Filament/Pages');
|
||||
if (is_dir($modulePathPages)) {
|
||||
$panel->discoverPages(in: $modulePathPages, for: 'Modules\\' . $module->name . '\\Filament\\Pages');
|
||||
$panel->discoverPages(in: $modulePathPages, for: 'Modules\\' . $module->name . '\\App\\Filament\\Pages');
|
||||
}
|
||||
$modulePathResources = module_path($module->name, 'App/Filament/Resources');
|
||||
if (is_dir($modulePathResources)) {
|
||||
|
|
Loading…
Reference in a new issue