Creating Apps
Apps control which functionality is available to tenants. They appear in the app switcher.
Creating an App
php artisan noerd:create-app
The command asks for:
- App Title - Display name (e.g., "Customer Management")
- App Name - Unique identifier, uppercase (e.g., "CRM")
- Icon - Heroicon name (searchable)
- Route - Main route name (e.g., "crm.index")
Assigning Apps to Tenants
php artisan noerd:assign-apps-to-tenant
Select a tenant, then toggle apps on/off with Space.
Quick Workflow
# 1. Create the module
php artisan noerd:module crm
# 2. Register module
composer update noerd/crm
php artisan migrate
# 3. Create the app
php artisan noerd:create-app
# 4. Assign to tenant
php artisan noerd:assign-apps-to-tenant
Background: Apps vs. Modules
Apps and modules are not the same thing.
| Aspect | Module | App |
|---|---|---|
| Purpose | Code organization | User access control |
| Location | app-modules/ |
Database (tenant_apps table) |
| Contains | PHP code, views, routes | Configuration only |
Examples
- One module, multiple apps: The
noerdmodule provides both "Setup" and core functionality. - Multiple modules, one app: A "Shop" app might combine
product,order, andvouchermodules. - One module, one app: A
mediamodule maps directly to a "Media" app.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tenant A β
β βββββββββββ βββββββββββ βββββββββββ β
β β CMS App β βShop App β βSetup Appβ β
β ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ β
βββββββββΌβββββββββββββΌβββββββββββββΌββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββ βββββββββββββ βββββββββββββ
βcms module β βproduct β βnoerd β
β β βorder β βmodule β
β β βvoucher β β β
βββββββββββββ βββββββββββββ βββββββββββββ
Detailed Command Reference
noerd:create-app
Interactive mode:
$ php artisan noerd:create-app
App Title (display name):
> Customer Management
App Name (unique identifier):
> CRM
Search for a Heroicon:
> users
App Route:
> crm.index
β
Tenant app created successfully!
e>
Non-interactive mode:
php artisan noerd:create-app \
--title="Customer Management" \
--name="CRM" \
--icon="heroicon:outline:users" \
--route="crm.index"
noerd:assign-apps-to-tenant
$ php artisan noerd:assign-apps-to-tenant
Select a tenant:
> Company Inc. (ID: 1, Apps: 2)
Select apps to assign:
βΊ β CMS (CMS)
β― Customer Management (CRM)
β Setup (SETUP)
β
App assignments updated successfully!
y!
Non-interactive:
php artisan noerd:assign-apps-to-tenant --tenant-id=1
App Navigation
Each app needs a navigation.yml:
app-configs/{app-name}/navigation.yml
Example:
- title: crm_nav_customers
name: customers
route: crm.index
block_menus:
- title: crm_nav_overview
navigations:
- { title: crm_nav_customers, route: crm.customers, heroicon: users }