Appearance
Web, broadcast and console routes ​
Overview ​
This page covers the four route files that are not JSON APIs for the frontends:
| File | Loaded by | What it holds |
|---|---|---|
routes/web.php | RouteServiceProvider, web middleware group, no prefix | Status pages and the internal super-admin panel (Blade views, session login) under /admin, plus database backup hooks. 115 routes. |
routes/web2.php | Nothing | Leftover file. Not loaded anywhere. |
routes/channels.php | BroadcastServiceProvider | 6 private broadcast channels. |
routes/console.php | App\Console\Kernel::commands() | 1 closure Artisan command. |
RouteServiceProvider also registers one route outside every file: GET /health (HealthController@index), with no middleware group. It checks the database, Typesense search, the queue, the ZIP worker URL, storage and cache, and returns status (ok or degraded), app, environment, timestamp and checks (each up/down with response_time_ms). HTTP 200 when healthy, 503 otherwise.
web.php ​
The web group adds cookies, the session, ShareErrorsFromSession, VerifyCsrfToken and SubstituteBindings (see Middleware). Apart from the root and status routes, everything sits in Route::group(['prefix' => 'admin', 'middleware' => ['throttle:600,1', 'adminSession']]) and uses Route::controller(...) groups, so table entries give only the method name in the file.
How super-admin auth works ​
Since PR #453 the whole /admin group runs the adminSession middleware (App\Http\Middleware\VerifyAdminSession). Login is still done by hand:
POST /admin/login(AdminController@authenticate) validatesemailandpassword(both required), then looks upAdminby email and the MD5 of the password. On success it storesis_logged_in,admin_id,nameandemailin the session.adminSessioncheckssession('is_logged_in'). Without it, a page request is redirected to/admin/login; a request that expects JSON (or an AJAX call) gets401 {"message":"Unauthenticated"}.- Five routes opt out with
withoutMiddleware('adminSession'), because they are reached before login or by customers and Stripe:GET /admin/login,POST /admin/login,GET /admin/subscription/checkout-session-complete,GET /admin/subscription/customer-invoice-paidandGET /admin/subscription/payment-success/{id}. The route file says the two checkout routes stay ungated "until their external caller is confirmed". - Many methods also check
is_logged_inthemselves. The Session check column shows how each route is protected: middleware means onlyadminSessionchecks it, yes means the method body checks it too, no means one of the five excluded routes (no session needed). POST /admin/subscription/users-statuspoints atUserController@getUserStatus, which does not exist.
VerifyCsrfToken excludes only filepreviews/webhook. No web route has that path (the file-preview webhook lives at /api/v1/filepreviews/webhook, where CSRF does not apply), so every POST below needs a CSRF token. That includes the dam-db-backup hooks, which also need an operator session (see Database backup hooks).
Status pages and root ​
Middleware: web. Routes: 4.
No group middleware beyond web. StatusController@index is the JSON status at /; /status is a password-gated HTML status page (the unlock flag lives in the session, status/check is throttled to 10 per minute).
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | / | StatusController@index | - | n/a | - |
| POST | /status/check | StatusController@checkPassword | - | n/a | Adds throttle:10,1. |
| POST | /status/lock | StatusController@lock | - | n/a | - |
| GET | /status | StatusController@serverPage | - | yes | - |
Super admin: workspaces and analytics ​
Middleware: web, throttle:600,1. Routes: 17.
AdminController. Login checks the Admin model and stores is_logged_in, admin_id, name, email in the session.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/login | AdminController@showLoginPage | - | no | - |
| POST | /admin/login | AdminController@authenticate | - | no | - |
| GET | /admin/logout | AdminController@logoutUser | - | middleware | - |
| GET | /admin/dashboard | AdminController@showDashboard | - | yes | - |
| GET | /admin/workspaces | AdminController@showWorkspaceList | - | yes | - |
| GET | /admin/analytics-dashboard | AdminController@showAnalyticsDashboard | - | middleware | - |
| GET | /admin/analytics-dashboard-graph-data/{type} | AdminController@showAnalyticsDashboardGraphData | - | middleware | - |
| GET | /admin/all-workspace-data | AdminController@getAllWorkspaceData | - | middleware | - |
| GET | /admin/workspaces/{id} | AdminController@viewWorkspace | - | yes | - |
| GET | /admin/workspaces/{id}/activity | AdminController@getWorkspaceActivity | - | yes | - |
| POST | /admin/add-workspace-module | AdminController@addWorkspaceModule | - | middleware | - |
| POST | /admin/search-workspace-data | AdminController@searchAllWorkspaceData | - | middleware | - |
| GET | /admin/project-status | AdminController@projectStatus | - | middleware | - |
| GET | /admin/all-project-status | AdminController@getAllProjectStatusList | - | middleware | - |
| POST | /admin/update-status-color | AdminController@updateStatusColor | - | middleware | - |
| POST | /admin/update-text-color | AdminController@updateTextColor | - | middleware | - |
| POST | /admin/add-project-status | AdminController@addProjectStatus | - | middleware | - |
Super admin: users ​
Middleware: web, throttle:600,1. Routes: 3.
AdminUsersController. Workspace users and Brand Portal users across all workspaces.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/users | AdminUsersController@index | - | yes | - |
| GET | /admin/users/workspace-users | AdminUsersController@workspaceUsers | - | yes | - |
| GET | /admin/users/portal-users | AdminUsersController@portalUsers | - | yes | - |
Super admin: operations ​
Middleware: web, throttle:600,1. Routes: 3.
OperationsController. Runs whitelisted Artisan commands (reports and similar) from a form.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/operations | OperationsController@index | - | yes | - |
| POST | /admin/operations/run | OperationsController@runOperation | - | yes | - |
| GET | /admin/operations/status | OperationsController@status | - | yes | - |
Mautic ​
Middleware: web, throttle:600,1. Routes: 20.
Prefix admin/mautic, MauticController. Mautic/SharpSpring form and field mapping per workspace.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/mautic/account/view | MauticController@viewMauticAccount | - | middleware | - |
| POST | /admin/mautic/account/account-data | MauticController@getMauticAccountData | - | middleware | - |
| POST | /admin/mautic/account/add-update | MauticController@addUpdateMauticAccount | - | middleware | - |
| GET | /admin/mautic/list | MauticController@listAllMauticForm | - | middleware | - |
| POST | /admin/mautic/workspace-list | MauticController@listWorkSpaceAllMauticForm | - | middleware | - |
| GET | /admin/mautic/add | MauticController@addMauticNewForm | - | middleware | - |
| POST | /admin/mautic/form-input | MauticController@getMauticFormInput | - | middleware | - |
| POST | /admin/mautic/add | MauticController@addMauticForm | - | middleware | - |
| POST | /admin/mautic/manage-mautic-fields | MauticController@manageMauticGlobalFields | - | middleware | - |
| POST | /admin/mautic/custom-n-mautic-fields | MauticController@getCustomAndMauticField | - | middleware | - |
| GET | /admin/mautic/view/{workspace_id}/{mautic_forms_id} | MauticController@viewMauticForm | - | middleware | - |
| POST | /admin/mautic/update | MauticController@updateMauticForm | - | middleware | - |
| POST | /admin/mautic/delete | MauticController@deleteMauticForm | - | middleware | - |
| GET | /admin/mautic/workspace/list | MauticController@listAllLeadWorkSpace | - | middleware | - |
| POST | /admin/mautic/workspace/ajax-list | MauticController@ajaxListAllLeadWorkSpace | - | middleware | - |
| GET | /admin/mautic/workspace/view/{workspace_id} | MauticController@viewWorkspaceSetting | - | middleware | - |
| POST | /admin/mautic/workspace/update | MauticController@updateWorkspaceSetting | - | middleware | - |
| GET | /admin/mautic/custom-field/list | MauticController@listAllCustomField | - | middleware | - |
| GET | /admin/mautic/custom-field/add | MauticController@addNewCustomField | - | middleware | - |
| POST | /admin/mautic/custom-field/add | MauticController@addCustomField | - | middleware | - |
Subscription: plans and coupons ​
Middleware: web, throttle:600,1. Routes: 6.
Prefix admin/subscription.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/plans | PlanController@index | subscription.plans.list | middleware | - |
| GET | /admin/subscription/add-plan | PlanController@addPlan | subscription.plans.add | middleware | - |
| POST | /admin/subscription/create | PlanController@create | subscription.plans.create | middleware | - |
| GET | /admin/subscription/view/{group_name} | PlanController@view | - | yes | - |
| POST | /admin/subscription/update | PlanController@update | subscription.plans.update | middleware | - |
| GET | /admin/subscription/coupons | CouponController@index | subscription.coupons.list | middleware | - |
Subscription: inquiries ​
Middleware: web, throttle:600,1. Routes: 4.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/inquiry | InquiryController@index | subscription.inquiry.list | yes | - |
| POST | /admin/subscription/get-inquiry | InquiryController@getInquiry | - | middleware | - |
| GET | /admin/subscription/export | InquiryController@export | subscription.inquiry.export | middleware | - |
| POST | /admin/subscription/inquiry-note | InquiryController@inquiryQuickNoteAdd | - | middleware | - |
Subscription: customers ​
Middleware: web, throttle:600,1. Routes: 24.
Web\Subscription\UserController. Per-workspace subscription, limits, white label, SSO and mail settings.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/user-list | UserController@index | subscription.user.list | yes | - |
| GET | /admin/subscription/active-user | UserController@getActiveUsers | - | middleware | - |
| POST | /admin/subscription/users-status | UserController@getUserStatus | - | - | Broken: method does not exist in the controller. |
| GET | /admin/subscription/view-user/{id} | UserController@viewUser | subscription.user.view | middleware | - |
| POST | /admin/subscription/change-workspace-status | UserController@changeWorkspaceStatus | - | middleware | - |
| POST | /admin/subscription/send-customer-invoice | UserController@sendInvoiceToCustomer | - | middleware | - |
| POST | /admin/subscription/send-customer-receipt | UserController@sendReceiptToCustomer | - | middleware | - |
| POST | /admin/subscription/send-activation-link | UserController@sendActivationLink | - | middleware | - |
| POST | /admin/subscription/user-mark-paid | UserController@userMarkAsPaid | - | middleware | - |
| POST | /admin/subscription/pause-payment-collection | UserController@pausePaymentCollection | - | middleware | - |
| POST | /admin/subscription/resume-payment-collection | UserController@resumePaymentCollection | - | middleware | - |
| POST | /admin/subscription/activity-log | UserController@activityLog | - | middleware | - |
| POST | /admin/subscription/cancel-schedule-subscription | UserController@cancelScheduleSubscription | - | middleware | - |
| POST | /admin/subscription/update-user-profile | UserController@updateUserProfile | - | middleware | - |
| POST | /admin/subscription/update-trial-days | UserController@updateTrialDays | - | middleware | - |
| POST | /admin/subscription/update-max-instances | UserController@updateMaxInstances | - | middleware | - |
| POST | /admin/subscription/update-user-limits | UserController@updateUserLimits | - | middleware | - |
| POST | /admin/subscription/delete-all-data | UserController@deleteAllUserData | - | middleware | - |
| POST | /admin/subscription/update-white-label | UserController@updateWhiteLabel | - | middleware | - |
| POST | /admin/subscription/update-white-label-status | UserController@updateWhiteLabelStatus | - | middleware | - |
| POST | /admin/subscription/update-sso-status | UserController@updateSsoStatus | - | middleware | - |
| POST | /admin/subscription/update-sso-domain | UserController@updateSsoDomain | - | middleware | Support override for one allowed SSO email domain: marks it verified (verified_by = support) after a manual ownership check, or resets it to pending. Errors: first validation message, Workspace not found., Domain not found on this workspace. See SSO domain verification. |
| POST | /admin/subscription/update-workspace-logo | UserController@updateWorkspaceLogo | - | middleware | - |
| POST | /admin/subscription/update-workspace-favicon | UserController@updateWorkspaceFavicon | - | middleware | - |
| POST | /admin/subscription/update-mail-settings | UserController@updateMailSettings | - | middleware | - |
Subscription: checkout and pay links ​
Middleware: web, throttle:600,1. Routes: 20.
Web\Subscription\SubscriptionController. Includes customer-facing pay-link and checkout pages.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/choose | SubscriptionController@index | subscription.choose.plan | middleware | - |
| GET | /admin/subscription/choose/{id} | SubscriptionController@details | subscription.selected.plan | middleware | - |
| GET | /admin/subscription/user/add | SubscriptionController@customerDetailAdd | subscription.user.add | middleware | - |
| POST | /admin/subscription/check-customer-email | SubscriptionController@checkCustomerEmail | - | middleware | - |
| POST | /admin/subscription/get-customer-inquiry | SubscriptionController@getCustomerInquiry | - | middleware | - |
| GET | /admin/subscription/choose-plan | SubscriptionController@selectCustomerPlan | subscription.user.select-plan | middleware | - |
| POST | /admin/subscription/customer-session-data | SubscriptionController@customerSessionData | - | middleware | - |
| GET | /admin/subscription/generate-invoice-pay-link | SubscriptionController@generateInvoiceAndPayLink | subscription.user.invoice-pay-link | middleware | - |
| POST | /admin/subscription/customer-invoice-payment | SubscriptionController@customerInvoicePayment | - | middleware | - |
| POST | /admin/subscription/share-pay-link-to-email | SubscriptionController@sharePayLinkToEmail | - | middleware | - |
| GET | /admin/subscription/store-qr-code | SubscriptionController@storePaymentQRCode | - | middleware | - |
| GET | /admin/subscription/checkout-session-complete | SubscriptionController@checkoutSessionComplete | - | no | - |
| GET | /admin/subscription/customer-invoice-paid | SubscriptionController@customerInvoicePaid | - | no | - |
| POST | /admin/subscription/resend-pay-link-to-email | SubscriptionController@resendPayLinkToEmail | - | middleware | - |
| GET | /admin/subscription/get-update-subscription/{user_id} | SubscriptionController@getUpdateSubscription | subscription.user.update | middleware | - |
| POST | /admin/subscription/upgrade-downgrade-plan | SubscriptionController@upgradeDowngradePlan | - | middleware | - |
| POST | /admin/subscription/create-trial-account | SubscriptionController@createTrialAccount | - | middleware | - |
| POST | /admin/subscription/cancel-subscription | SubscriptionController@cancelSubscription | - | middleware | - |
| POST | /admin/subscription/start-subscription | SubscriptionController@startSubscription | - | middleware | - |
| GET | /admin/subscription/payment-success/{id} | SubscriptionController@paymentSuccess | subscription.payment.success | no | - |
Subscription: invoices ​
Middleware: web, throttle:600,1. Routes: 4.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/invoice-list | InvoiceController@index | subscription.invoice.list | yes | - |
| POST | /admin/subscription/get-invoice | InvoiceController@getInvoices | - | middleware | - |
| POST | /admin/subscription/search-invoice-data | InvoiceController@searchInvoiceData | - | middleware | - |
| POST | /admin/subscription/invoice-user-data | InvoiceController@invoiceUserData | - | middleware | - |
Subscription: add-ons ​
Middleware: web, throttle:600,1. Routes: 6.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| GET | /admin/subscription/add-on-list | SubscriptionAddOnController@index | subscription.addon.list | yes | - |
| GET | /admin/subscription/add-addon | SubscriptionAddOnController@addAddOn | subscription.addon.add | middleware | - |
| POST | /admin/subscription/create-addon | SubscriptionAddOnController@createAddOn | subscription.addon.create | middleware | - |
| GET | /admin/subscription/view-addon/{id} | SubscriptionAddOnController@viewAddOn | subscription.addon.view | middleware | - |
| POST | /admin/subscription/update-addon | SubscriptionAddOnController@updateAddOn | subscription.addon.update | middleware | - |
| POST | /admin/subscription/update-addon-status | SubscriptionAddOnController@updateAddOnStatus | subscription.addon.update.status | middleware | - |
Database backup hooks ​
Middleware: web, adminSession, throttle:3,10. Routes: 3.
Prefix dam-db-backup. Inline closures. They need an operator session and allow 3 calls per 10 minutes, because a backup runs synchronously and archives the app (including .env) to S3. The route file notes that the slack_command string is not a secret.
| Method | Path | Controller@method | Route name | Session check | Notes |
|---|---|---|---|---|---|
| POST | /dam-db-backup/db-backup-run | Closure | - | middleware | Runs backup:run --only-db when slack_command is dam-db-backup; otherwise runs inspire. |
| POST | /dam-db-backup/db-backup-list | Closure | - | middleware | Runs backup:list when slack_command is dam-db-backup (returns nothing); otherwise runs inspire. |
| POST | /dam-db-backup/full-backup-run | Closure | - | middleware | Runs backup:run when slack_command is dam-db-backup; otherwise runs inspire. |
web2.php ​
routes/web2.php is not referenced by RouteServiceProvider, bootstrap/app.php or any other code, so none of its routes are registered. It holds two closures:
| Method | Path | Body |
|---|---|---|
| GET | / | Loads User::find(5) and calls workspaceUser()->detach(2), then die. The rest is commented-out role and permission experiments. |
| GET | /user | Empty (only comments). |
Do not load this file. Its root route would detach a real user from a workspace on every hit.
channels.php ​
BroadcastServiceProvider calls Broadcast::routes(['middleware' => ['auth:api,dam-api']]), which registers Laravel's channel auth endpoint (/broadcasting/auth) behind either the api guard (Collage Admin users) or the dam-api guard (Brand Portal users). It then loads routes/channels.php.
Every channel uses the same rule, allow when the signed-in user's id equals the id in the channel name ((int) $user->id === (int) $id), and since dd4df4a each channel names the one guard whose user may subscribe. users.id and dealer_users.id overlap, so without the guard a portal user with id 7 could subscribe to Admin user 7's channel.
| Channel | Parameter | Guard | Authorized when |
|---|---|---|---|
App.User.{id} | id | api | $user->id == id |
user.{id} | id | api | $user->id == id |
user.{user_id}.projectBatchNotification | user_id | api | $user->id == user_id |
user.{user_id}.DAMFrontendAnnouncementNotification | user_id | dam-api | $user->id == user_id |
user.{user_id}.getUserSubscriptionChannel | user_id | api | $user->id == user_id |
logoutDealershipUser.{user_id} | user_id | dam-api | $user->id == user_id |
console.php ​
App\Console\Kernel loads routes/console.php from its commands() method. It defines one closure command:
| Command | Description | Body |
|---|---|---|
inspire | Display an inspiring quote | $this->comment(Inspiring::quote()) |
Real commands are classes under app/Console/Commands, registered and scheduled in App\Console\Kernel. See Architecture.