+ {{ $module['name'] }} +
- - @forelse ($modules as $module) -+ {{ $module['description'] ?: 'No database description saved yet.' }} +
- @if ($module['enabled']) - - @else - - @endif -diff --git a/CHANGELOG.md b/CHANGELOG.md
old mode 100755
new mode 100644
diff --git a/LICENSE.md b/LICENSE.md
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
diff --git a/composer.json b/composer.json
old mode 100755
new mode 100644
diff --git a/config/config.php b/config/config.php
old mode 100755
new mode 100644
diff --git a/src/Activators/FileActivator.php b/src/Activators/FileActivator.php
old mode 100755
new mode 100644
diff --git a/src/Collection.php b/src/Collection.php
old mode 100755
new mode 100644
diff --git a/src/Commands/CommandMakeCommand.php b/src/Commands/CommandMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ComponentMakeCommand.php b/src/Commands/ComponentMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ControllerMakeCommand.php b/src/Commands/ControllerMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/DisableCommand.php b/src/Commands/DisableCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/DumpCommand.php b/src/Commands/DumpCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/EnableCommand.php b/src/Commands/EnableCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/EventMakeCommand.php b/src/Commands/EventMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/FactoryMakeCommand.php b/src/Commands/FactoryMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/GeneratorCommand.php b/src/Commands/GeneratorCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/HelperMakeCommand.php b/src/Commands/HelperMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/InstallCommand.php b/src/Commands/InstallCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/JobMakeCommand.php b/src/Commands/JobMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ListCommand.php b/src/Commands/ListCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ListenerMakeCommand.php b/src/Commands/ListenerMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MailMakeCommand.php b/src/Commands/MailMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MiddlewareMakeCommand.php b/src/Commands/MiddlewareMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrateCommand.php b/src/Commands/MigrateCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrateRefreshCommand.php b/src/Commands/MigrateRefreshCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrateResetCommand.php b/src/Commands/MigrateResetCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrateRollbackCommand.php b/src/Commands/MigrateRollbackCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrateStatusCommand.php b/src/Commands/MigrateStatusCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/MigrationMakeCommand.php b/src/Commands/MigrationMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ModelMakeCommand.php b/src/Commands/ModelMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ModuleDeleteCommand.php b/src/Commands/ModuleDeleteCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ModuleMakeCommand.php b/src/Commands/ModuleMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/NotificationMakeCommand.php b/src/Commands/NotificationMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/PolicyMakeCommand.php b/src/Commands/PolicyMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ProviderMakeCommand.php b/src/Commands/ProviderMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/PublishCommand.php b/src/Commands/PublishCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/PublishConfigurationCommand.php b/src/Commands/PublishConfigurationCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/PublishMigrationCommand.php b/src/Commands/PublishMigrationCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/PublishTranslationCommand.php b/src/Commands/PublishTranslationCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/RequestMakeCommand.php b/src/Commands/RequestMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/ResourceMakeCommand.php b/src/Commands/ResourceMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/RouteProviderMakeCommand.php b/src/Commands/RouteProviderMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/RuleMakeCommand.php b/src/Commands/RuleMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/SeedCommand.php b/src/Commands/SeedCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/SeedMakeCommand.php b/src/Commands/SeedMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/SetupCommand.php b/src/Commands/SetupCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/SupportMakeCommand.php b/src/Commands/SupportMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/TestMakeCommand.php b/src/Commands/TestMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/TraitMakeCommand.php b/src/Commands/TraitMakeCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/UnUseCommand.php b/src/Commands/UnUseCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/UpdateCommand.php b/src/Commands/UpdateCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/UseCommand.php b/src/Commands/UseCommand.php
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/Moduleinfo.stub b/src/Commands/stubs/Moduleinfo.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/assets/js/app.stub b/src/Commands/stubs/assets/js/app.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/assets/sass/app.stub b/src/Commands/stubs/assets/sass/app.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/command.stub b/src/Commands/stubs/command.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/component/controller.stub b/src/Commands/stubs/component/controller.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/component/view.stub b/src/Commands/stubs/component/view.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/composer.stub b/src/Commands/stubs/composer.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/controller-api.stub b/src/Commands/stubs/controller-api.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/controller-plain.stub b/src/Commands/stubs/controller-plain.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/controller.stub b/src/Commands/stubs/controller.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/event.stub b/src/Commands/stubs/event.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/factory.stub b/src/Commands/stubs/factory.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/feature-test.stub b/src/Commands/stubs/feature-test.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/helper.stub b/src/Commands/stubs/helper.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/job-queued.stub b/src/Commands/stubs/job-queued.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/job.stub b/src/Commands/stubs/job.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/json.stub b/src/Commands/stubs/json.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/listener-duck.stub b/src/Commands/stubs/listener-duck.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/listener-queued-duck.stub b/src/Commands/stubs/listener-queued-duck.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/listener-queued.stub b/src/Commands/stubs/listener-queued.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/listener.stub b/src/Commands/stubs/listener.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/mail.stub b/src/Commands/stubs/mail.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/middleware.stub b/src/Commands/stubs/middleware.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/migration/add.stub b/src/Commands/stubs/migration/add.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/migration/create.stub b/src/Commands/stubs/migration/create.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/migration/delete.stub b/src/Commands/stubs/migration/delete.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/migration/drop.stub b/src/Commands/stubs/migration/drop.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/migration/plain.stub b/src/Commands/stubs/migration/plain.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/model.stub b/src/Commands/stubs/model.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/notification.stub b/src/Commands/stubs/notification.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/package.stub b/src/Commands/stubs/package.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/policy.plain.stub b/src/Commands/stubs/policy.plain.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/provider.stub b/src/Commands/stubs/provider.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/request.stub b/src/Commands/stubs/request.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/resource-collection.stub b/src/Commands/stubs/resource-collection.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/resource.stub b/src/Commands/stubs/resource.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/route-provider.stub b/src/Commands/stubs/route-provider.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/routes/api.stub b/src/Commands/stubs/routes/api.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/routes/web.stub b/src/Commands/stubs/routes/web.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/rule.stub b/src/Commands/stubs/rule.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/scaffold/config.stub b/src/Commands/stubs/scaffold/config.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/scaffold/provider.stub b/src/Commands/stubs/scaffold/provider.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/seeder.stub b/src/Commands/stubs/seeder.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/trait.stub b/src/Commands/stubs/trait.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/unit-test.stub b/src/Commands/stubs/unit-test.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/views/index.stub b/src/Commands/stubs/views/index.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/views/master.stub b/src/Commands/stubs/views/master.stub
old mode 100755
new mode 100644
diff --git a/src/Commands/stubs/webpack.stub b/src/Commands/stubs/webpack.stub
old mode 100755
new mode 100644
diff --git a/src/Contracts/ActivatorInterface.php b/src/Contracts/ActivatorInterface.php
old mode 100755
new mode 100644
diff --git a/src/Contracts/PublisherInterface.php b/src/Contracts/PublisherInterface.php
old mode 100755
new mode 100644
diff --git a/src/Contracts/RepositoryInterface.php b/src/Contracts/RepositoryInterface.php
old mode 100755
new mode 100644
diff --git a/src/Contracts/RunableInterface.php b/src/Contracts/RunableInterface.php
old mode 100755
new mode 100644
diff --git a/src/DevelopmentSupport/Entities/ModuleStatus.php b/src/DevelopmentSupport/Entities/ModuleStatus.php
index 45d14d0..6de6215 100644
--- a/src/DevelopmentSupport/Entities/ModuleStatus.php
+++ b/src/DevelopmentSupport/Entities/ModuleStatus.php
@@ -26,6 +26,8 @@ class ModuleStatus extends Model
protected $fillable = [
'module',
'enabled',
+ 'description',
+ 'sort_order',
];
/**
@@ -35,5 +37,6 @@ class ModuleStatus extends Model
*/
protected $casts = [
'enabled' => 'boolean',
+ 'sort_order' => 'integer',
];
}
diff --git a/src/Exceptions/FileAlreadyExistException.php b/src/Exceptions/FileAlreadyExistException.php
old mode 100755
new mode 100644
diff --git a/src/Exceptions/InvalidActivatorClass.php b/src/Exceptions/InvalidActivatorClass.php
old mode 100755
new mode 100644
diff --git a/src/Exceptions/InvalidAssetPath.php b/src/Exceptions/InvalidAssetPath.php
old mode 100755
new mode 100644
diff --git a/src/Exceptions/InvalidJsonException.php b/src/Exceptions/InvalidJsonException.php
old mode 100755
new mode 100644
diff --git a/src/Exceptions/ModuleNotFoundException.php b/src/Exceptions/ModuleNotFoundException.php
old mode 100755
new mode 100644
diff --git a/src/Facades/Module.php b/src/Facades/Module.php
old mode 100755
new mode 100644
diff --git a/src/FileRepository.php b/src/FileRepository.php
old mode 100755
new mode 100644
diff --git a/src/Generators/FileGenerator.php b/src/Generators/FileGenerator.php
old mode 100755
new mode 100644
diff --git a/src/Generators/Generator.php b/src/Generators/Generator.php
old mode 100755
new mode 100644
diff --git a/src/Generators/ModuleGenerator.php b/src/Generators/ModuleGenerator.php
old mode 100755
new mode 100644
diff --git a/src/Http/Controllers/ModuleControlController.php b/src/Http/Controllers/ModuleControlController.php
index c9cea4c..427717d 100644
--- a/src/Http/Controllers/ModuleControlController.php
+++ b/src/Http/Controllers/ModuleControlController.php
@@ -3,6 +3,7 @@
namespace mpba\Modules\Http\Controllers;
use Illuminate\Http\RedirectResponse;
+use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\View\View;
use mpba\Modules\Support\DatabaseModuleRegistry;
@@ -27,6 +28,20 @@ class ModuleControlController extends Controller
]);
}
+ public function update(Request $request, string $module): RedirectResponse
+ {
+ $data = $request->validate([
+ 'description' => ['nullable', 'string', 'max:2000'],
+ 'sort_order' => ['nullable', 'integer', 'min:0', 'max:999999'],
+ ]);
+
+ $this->registry->update($module, $data);
+
+ return redirect()
+ ->route('modules.control.show', $module)
+ ->with('status', "{$module} database metadata saved.");
+ }
+
public function sync(): RedirectResponse
{
$this->registry->syncMissingStatuses();
diff --git a/src/Json.php b/src/Json.php
old mode 100755
new mode 100644
diff --git a/src/Laravel/LaravelFileRepository.php b/src/Laravel/LaravelFileRepository.php
old mode 100755
new mode 100644
diff --git a/src/Laravel/Module.php b/src/Laravel/Module.php
old mode 100755
new mode 100644
diff --git a/src/LaravelModulesServiceProvider.php b/src/LaravelModulesServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Lumen/LumenFileRepository.php b/src/Lumen/LumenFileRepository.php
old mode 100755
new mode 100644
diff --git a/src/Lumen/Module.php b/src/Lumen/Module.php
old mode 100755
new mode 100644
diff --git a/src/LumenModulesServiceProvider.php b/src/LumenModulesServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Migrations/Migrator.php b/src/Migrations/Migrator.php
old mode 100755
new mode 100644
diff --git a/src/Module.php b/src/Module.php
old mode 100755
new mode 100644
diff --git a/src/ModulesServiceProvider.php b/src/ModulesServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Process/Installer.php b/src/Process/Installer.php
old mode 100755
new mode 100644
diff --git a/src/Process/Runner.php b/src/Process/Runner.php
old mode 100755
new mode 100644
diff --git a/src/Process/Updater.php b/src/Process/Updater.php
old mode 100755
new mode 100644
diff --git a/src/Providers/BootstrapServiceProvider.php b/src/Providers/BootstrapServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Providers/ConsoleServiceProvider.php b/src/Providers/ConsoleServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Providers/ContractsServiceProvider.php b/src/Providers/ContractsServiceProvider.php
old mode 100755
new mode 100644
diff --git a/src/Publishing/AssetPublisher.php b/src/Publishing/AssetPublisher.php
old mode 100755
new mode 100644
diff --git a/src/Publishing/LangPublisher.php b/src/Publishing/LangPublisher.php
old mode 100755
new mode 100644
diff --git a/src/Publishing/MigrationPublisher.php b/src/Publishing/MigrationPublisher.php
old mode 100755
new mode 100644
diff --git a/src/Publishing/Publisher.php b/src/Publishing/Publisher.php
old mode 100755
new mode 100644
diff --git a/src/Routing/Controller.php b/src/Routing/Controller.php
old mode 100755
new mode 100644
diff --git a/src/Support/Config/GenerateConfigReader.php b/src/Support/Config/GenerateConfigReader.php
old mode 100755
new mode 100644
diff --git a/src/Support/Config/GeneratorPath.php b/src/Support/Config/GeneratorPath.php
old mode 100755
new mode 100644
diff --git a/src/Support/DatabaseModuleRegistry.php b/src/Support/DatabaseModuleRegistry.php
index 0bcb281..4477cb9 100644
--- a/src/Support/DatabaseModuleRegistry.php
+++ b/src/Support/DatabaseModuleRegistry.php
@@ -22,23 +22,13 @@ class DatabaseModuleRegistry
->keyBy('module');
return collect($this->modules->all())
- ->sortBy(fn (Module $module) => $module->get('order', 0))
->map(function (Module $module) use ($statuses): array {
- $status = $statuses->get($module->getName());
-
- return [
- 'name' => $module->getName(),
- 'alias' => $module->getAlias(),
- 'description' => $module->getDescription(),
- 'version' => $module->get('version'),
- 'order' => $module->get('order', 0),
- 'path' => $module->getPath(),
- 'requires' => $module->getRequires(),
- 'enabled' => (bool) ($status?->enabled ?? $module->isEnabled()),
- 'status_record' => $status,
- 'module' => $module,
- ];
+ return $this->mapModule($module, $statuses->get($module->getName()));
})
+ ->sortBy([
+ fn (array $module) => $module['sort_order'],
+ fn (array $module) => $module['name'],
+ ])
->values();
}
@@ -50,21 +40,29 @@ class DatabaseModuleRegistry
$module = $this->modules->findOrFail($name);
$status = ModuleStatus::query()->firstOrCreate(
['module' => $module->getName()],
- ['enabled' => $module->isEnabled()]
+ [
+ 'enabled' => $module->isEnabled(),
+ 'sort_order' => (int) $module->get('order', 0),
+ ]
);
- return [
- 'name' => $module->getName(),
- 'alias' => $module->getAlias(),
- 'description' => $module->getDescription(),
- 'version' => $module->get('version'),
- 'order' => $module->get('order', 0),
- 'path' => $module->getPath(),
- 'requires' => $module->getRequires(),
- 'enabled' => (bool) $status->enabled,
- 'status_record' => $status,
- 'module' => $module,
- ];
+ return $this->mapModule($module, $status);
+ }
+
+ public function update(string $name, array $data): void
+ {
+ $module = $this->modules->findOrFail($name);
+
+ ModuleStatus::query()->updateOrCreate(
+ ['module' => $module->getName()],
+ [
+ 'enabled' => ModuleStatus::query()
+ ->where('module', $module->getName())
+ ->value('enabled') ?? $module->isEnabled(),
+ 'description' => $data['description'] ?? null,
+ 'sort_order' => (int) ($data['sort_order'] ?? 0),
+ ]
+ );
}
public function enable(string $name): void
@@ -73,7 +71,10 @@ class DatabaseModuleRegistry
ModuleStatus::query()->updateOrCreate(
['module' => $module->getName()],
- ['enabled' => true]
+ [
+ 'enabled' => true,
+ 'sort_order' => (int) $module->get('order', 0),
+ ]
);
$this->modules->enable($module->getName());
@@ -85,7 +86,10 @@ class DatabaseModuleRegistry
ModuleStatus::query()->updateOrCreate(
['module' => $module->getName()],
- ['enabled' => false]
+ [
+ 'enabled' => false,
+ 'sort_order' => (int) $module->get('order', 0),
+ ]
);
$this->modules->disable($module->getName());
@@ -96,8 +100,35 @@ class DatabaseModuleRegistry
foreach ($this->modules->all() as $module) {
ModuleStatus::query()->firstOrCreate(
['module' => $module->getName()],
- ['enabled' => $module->isEnabled()]
+ [
+ 'enabled' => $module->isEnabled(),
+ 'sort_order' => (int) $module->get('order', 0),
+ ]
);
}
}
+
+ protected function mapModule(Module $module, ?ModuleStatus $status): array
+ {
+ return [
+ 'name' => $module->getName(),
+ 'alias' => $module->getAlias(),
+ 'description' => $status?->description,
+ 'disk_description' => $module->getDescription(),
+ 'version' => $this->moduleVersion($module),
+ 'sort_order' => (int) ($status?->sort_order ?? $module->get('order', 0)),
+ 'path' => $module->getPath(),
+ 'requires' => $module->getRequires(),
+ 'enabled' => (bool) ($status?->enabled ?? $module->isEnabled()),
+ 'status_record' => $status,
+ 'module' => $module,
+ ];
+ }
+
+ protected function moduleVersion(Module $module): ?string
+ {
+ $version = $module->get('version');
+
+ return is_string($version) && $version !== '' ? $version : null;
+ }
}
diff --git a/src/Support/Migrations/NameParser.php b/src/Support/Migrations/NameParser.php
old mode 100755
new mode 100644
diff --git a/src/Support/Migrations/SchemaParser.php b/src/Support/Migrations/SchemaParser.php
old mode 100755
new mode 100644
diff --git a/src/Support/Stub.php b/src/Support/Stub.php
old mode 100755
new mode 100644
diff --git a/src/Traits/CanClearModulesCache.php b/src/Traits/CanClearModulesCache.php
old mode 100755
new mode 100644
diff --git a/src/Traits/MigrationLoaderTrait.php b/src/Traits/MigrationLoaderTrait.php
old mode 100755
new mode 100644
diff --git a/src/Traits/ModuleCommandTrait.php b/src/Traits/ModuleCommandTrait.php
old mode 100755
new mode 100644
diff --git a/src/database/migrations/2026_07_01_000000_create_module_statuses_table.php b/src/database/migrations/2026_07_01_000000_create_module_statuses_table.php
index 4afda4e..92c048a 100644
--- a/src/database/migrations/2026_07_01_000000_create_module_statuses_table.php
+++ b/src/database/migrations/2026_07_01_000000_create_module_statuses_table.php
@@ -21,6 +21,8 @@ return new class extends Migration
$table->id();
$table->string('module')->unique();
$table->boolean('enabled')->default(true);
+ $table->text('description')->nullable();
+ $table->unsignedInteger('sort_order')->default(0);
$table->timestamps();
});
}
diff --git a/src/database/migrations/2026_07_01_000100_add_database_metadata_to_module_statuses_table.php b/src/database/migrations/2026_07_01_000100_add_database_metadata_to_module_statuses_table.php
new file mode 100644
index 0000000..ada6d8b
--- /dev/null
+++ b/src/database/migrations/2026_07_01_000100_add_database_metadata_to_module_statuses_table.php
@@ -0,0 +1,44 @@
+text('description')->nullable()->after('enabled');
+ }
+
+ if (! Schema::hasColumn('module_statuses', 'sort_order')) {
+ $table->unsignedInteger('sort_order')->default(0)->after('description');
+ }
+ });
+ }
+
+ public function down(): void
+ {
+ if (! Schema::hasTable('module_statuses')) {
+ return;
+ }
+
+ Schema::table('module_statuses', function (Blueprint $table): void {
+ if (Schema::hasColumn('module_statuses', 'sort_order')) {
+ $table->dropColumn('sort_order');
+ }
+
+ if (Schema::hasColumn('module_statuses', 'description')) {
+ $table->dropColumn('description');
+ }
+ });
+ }
+};
diff --git a/src/helpers.php b/src/helpers.php
old mode 100755
new mode 100644
diff --git a/src/resources/views/index.blade.php b/src/resources/views/index.blade.php
index b07848e..b8dab6e 100644
--- a/src/resources/views/index.blade.php
+++ b/src/resources/views/index.blade.php
@@ -2,92 +2,141 @@
Status is read from and written to the database, not modules_statuses.json.
++ Enabled state, sort order, and custom descriptions are stored only in the database. +
| Module | -Database Record | -Status | -Actions | -
|---|---|---|---|
|
- {{ $module['name'] }}
- {{ $module['description'] ?: 'No description provided.' }}
- {{ $module['path'] }}
- |
-
-
- @if ($module['status_record'])
- ID: {{ $module['status_record']->id }}
- module: {{ $module['status_record']->module }}
- @else
- Missing
- @endif
- |
-
- @if ($module['enabled']) - Enabled + + Enabled + @else - Disabled + + Disabled + @endif - | + -
-
- View
+
- + {{ $module['description'] ?: 'No database description saved yet.' }} + - @if ($module['enabled']) - - @else - - @endif - |
-
| No modules found on disk. | -|||
+ Disk description: {{ $module['disk_description'] }} +
+ @endif ++ This description is stored in the module_statuses table only. It does not edit module.json. +
+ + +