Feature Flags
WebCMS ships with a few SaaS-legacy features that a simple company-profile project may not need.
Instead of deleting code, each feature is controlled by a flag in config/webcms.php,
overridable per environment via WEBCMS_FEATURES_* variables.
Turning a flag off unregisters its routes (visitors get a clean 404, not an error) and hides
its menu links. No code is deleted, so the feature can be re-enabled anytime.
Available flags
| Flag | Env variable | Default | Effect when off |
|---|---|---|---|
waitlist |
WEBCMS_FEATURES_WAITLIST |
true |
/waitlist route is not registered. |
request_demo |
WEBCMS_FEATURES_REQUEST_DEMO |
true |
/request-demo route is not registered; footer link is hidden. |
ai_chat |
WEBCMS_FEATURES_AI_CHAT |
true |
/ai-chat and /ai-simple routes are not registered; sidebar links are hidden. |
phone_verification |
WEBCMS_FEATURES_PHONE_VERIFICATION |
true |
Reserved for the phone-verification flow; no active UI is gated by it yet. |
Usage
Disable via .env
WEBCMS_FEATURES_AI_CHAT=false
WEBCMS_FEATURES_REQUEST_DEMO=false
Check in code
if (config('webcms.features.ai_chat')) {
// ...
}
Hide a menu link in Blade
<a href="https://tblog.cis.my.id/request-demo">Request a Demo</a>
Where to find it
-
Config
config/webcms.php -
Routes
routes/web.php(conditional registration)