webx-ui / module-settings
Site settings for the WebX UI admin panel: a screen described as JSON, patched by the project, saved by description.
Requires
- php: ^8.4
- illuminate/contracts: ^13.0
- illuminate/database: ^13.0
- illuminate/http: ^13.0
- illuminate/routing: ^13.0
- illuminate/support: ^13.0
- illuminate/validation: ^13.0
- webx-ui/localization: ^0.65.0
- webx-ui/mcp: ^0.65.0
- webx-ui/module-admin: ^0.65.0
- webx-ui/module-auth: ^0.65.0
Requires (Dev)
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.0 || ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.65.0
- v0.64.0
- v0.63.0
- v0.62.1
- v0.62.0
- v0.61.1
- v0.61.0
- v0.60.0
- v0.59.0
- v0.58.0
- v0.57.0
- v0.56.0
- v0.55.0
- v0.54.0
- v0.53.1
- v0.53.0
- v0.52.0
- v0.51.0
- v0.50.0
- v0.49.2
- v0.49.1
- v0.49.0
- v0.48.0
- v0.47.0
- v0.46.0
- v0.45.0
- v0.44.1
- v0.44.0
- v0.43.0
- v0.42.3
- v0.42.2
- v0.42.1
- v0.42.0
- v0.41.0
- v0.40.1
- v0.40.0
- v0.39.0
- v0.38.0
- v0.37.0
- v0.36.0
- v0.35.1
- v0.35.0
- v0.34.0
- v0.33.0
- v0.32.1
- v0.32.0
- v0.31.0
- v0.30.0
- v0.29.1
- v0.29.0
- v0.28.0
- v0.27.2
- v0.27.1
- v0.27.0
- v0.26.1
- v0.26.0
- v0.25.1
- v0.25.0
- v0.24.1
- v0.23.0
- v0.22.1
- v0.22.0
- v0.21.0
- v0.20.1
- v0.20.0
- v0.19.0
- v0.18.0
- v0.17.0
- v0.16.2
- v0.16.1
- v0.16.0
- v0.15.0
- v0.14.1
- v0.14.0
- v0.13.0
- dev-next
This package is auto-updated.
Last update: 2026-10-08 17:03:29 UTC
README
Site settings as a section of the WebX UI admin panel. The screen is a JSON tree the package ships; the project lays its own tabs and fields over it with a patch, and saving goes by the same description — a key the tree does not name is not written.
Requirements
- PHP 8.4+, Laravel 13
webx-ui/module-admin,webx-ui/module-auth(the panel and the sign-in),webx-ui/mcp
Install
composer require webx-ui/module-settings php artisan migrate
The section appears once the front end lists it too: settings() from @webx-ui/module-settings
in createAdmin({ modules: [...] }). Permissions: settings.view, settings.manage.
The screen
settings.index, two tabs out of the box:
| id | type | name |
|---|---|---|
tabs |
wx-tabs |
|
general |
wx-tab |
|
general-card |
wx-card |
|
project-name |
wx-input |
general.project-name |
branding |
wx-tab |
|
branding-card |
wx-card |
|
logo |
wx-media |
branding.logo |
mark |
wx-media |
branding.mark |
Those three are what the panel wears. PanelBranding answers
WebxUi\Admin\Contracts\BrandingSource with them, so they reach the frame in the manifest:
the name in the corner (and the logo's alt), the logo for the open sidebar, the square mark
for the 56 px rail. A name left empty falls back to WEBX_ADMIN_TITLE; a picture this package
cannot turn into an address — module-media is what resolves one, and it is not required — is
no picture, and the corner keeps its name.
Those ids are the public contract: a project addresses them from its patch. Add what the site needs from a service provider that boots after this one — the application's own does:
use WebxUi\Admin\Facades\Screens; Screens::extend('settings.index', resource_path('screens/settings.json'));
[
{
"op": "add",
"target": "tabs",
"node": {
"id": "seo",
"type": "wx-tab",
"label": "SEO",
"children": [
{
"id": "seo-card",
"type": "wx-card",
"children": [
{
"id": "robots",
"type": "wx-textarea",
"name": "seo.robots-txt",
"label": "robots.txt"
}
]
}
]
}
}
]
A field added by a patch is a field the server accepts: validated with the rules its type
declares, per language when localized, stored under its name.
Reading a setting
settings('general.project-name'); // the current language, with the site's fallbacks settings('seo.robots-txt', 'User-agent: *'); settings()->all(); // everything the screen describes, resolved
Values are cached whole and the cache is dropped on save; WebxUi\Settings\Events\SettingsSaved
carries the keys that changed.
MCP
settings_list, settings_get, settings_set (mutating, honours dry_run) — the keys and the
rules come from the screen, so an agent can change exactly what an administrator can. value: null
(or the string "null") clears a setting of any type, every language at once; {"de": null}
empties one language. A cleared key has no row, so settings('key', $default) returns the default.
Languages
en, ru, uk, de, pl, fr, es, it, pt, tr. Only English, Russian and Ukrainian have been read by a speaker.
Licence
MIT.