Overview
Developer controllers provide system-wide insights and monitoring capabilities. All routes require authentication and therole:developer middleware. Developer role has elevated permissions to view data across all companies.
Company Insights
View and monitor all companies in the system.List All Companies
Display list of all companies with subscription and user information.
auth, role:developer
Route Name: developer.companies.index
Response:
- Returns view with all companies
- Includes subscription details for each company
- Includes user count and user list
- Ordered alphabetically by company name
App\Http\Controllers\Developer\CompanyInsightsController@index
Source: routes/web.php:86
Related Models:
- Company (with subscription and users relationships)
- Subscription
- User
View Company Details
Display detailed information for a specific company.
auth, role:developer
Route Name: developer.companies.show
URL Parameters:
Company ID
- Returns view with complete company details
- Includes subscription information
- Includes all users (workers and admins)
- Company profile and settings
- Usage statistics
App\Http\Controllers\Developer\CompanyInsightsController@show
Source: routes/web.php:87
Accessible Information:
- Company profile (name, owner, contact details)
- Subscription status and plan
- All users in the company
- Module access settings
- Company statistics
View All Subscriptions
Display subscription overview for all companies.
auth, role:developer
Route Name: developer.subscriptions
Response:
- Returns view with all companies and their subscriptions
- Ordered alphabetically by company name
- Useful for monitoring subscription statuses across the system
App\Http\Controllers\Developer\CompanyInsightsController@subscriptions
Source: routes/web.php:88
Use Cases:
- Monitor active vs. trial subscriptions
- Identify expired or expiring subscriptions
- Track subscription upgrades/downgrades
- Analyze subscription distribution (starter, pro, enterprise)
View Test Company
Quick access to the “ElectroFix Developer Lab” test company.
auth, role:developer
Route Name: developer.test-company
Response:
- Returns view with test company details
- Finds company named “ElectroFix Developer Lab”
- Includes subscription and user information
- Fails with 404 if test company doesn’t exist
App\Http\Controllers\Developer\CompanyInsightsController@testCompany
Source: routes/web.php:89
Purpose:
- Quick access to development/testing company
- Verify test data and configurations
- Test features in isolated environment
Developer Privileges
The developer role has special access across the system:Cross-Company Access
Developers can access data from all companies:- View orders from any company
- Access customers across companies
- See all equipment records
- Monitor inventory items system-wide
- View billing documents from all companies
Bypassed Restrictions
Developers bypass certain company-level restrictions:- Orders: Can modify orders from any company
- Equipment: Can diagnose equipment from any company
- Billing: Can access documents from any company
- Workers: Full visibility into all user accounts
Developer Dashboard
Access the developer-specific dashboard:Display developer dashboard with system-wide metrics.
auth, role:developer
Route Name: dashboard.developer
Controller: App\Http\Controllers\DashboardController@developer
Source: routes/web.php:85
Usage Examples
Viewing Company List
Viewing Specific Company Details
Monitoring Subscriptions
Accessing Test Company
System Monitoring
Developers can monitor system-wide metrics:Subscription Analytics
- Active subscriptions: Companies with status “active”
- Trial subscriptions: Companies in trial period
- Expired subscriptions: Past end date
- Plan distribution: Count of starter/pro/enterprise plans
User Metrics
- Total users: Across all companies
- Active users: Currently enabled accounts
- Inactive users: Deactivated accounts
- Role distribution: Admins vs. workers
Company Health
- Total companies: System-wide count
- Companies without subscriptions: Requiring attention
- Module adoption: Billing and inventory usage rates
- User capacity: Companies near user limits
Developer Testing
The developer role is designed for:- Cross-company testing: Verify features work across different companies
- Data validation: Check data integrity and relationships
- Subscription testing: Test different plan configurations
- User management: Monitor account creation and permissions
- System monitoring: Track overall system health and usage
Security Note
The developer role has elevated privileges and should be restricted to trusted system administrators only. Developer accounts can:- View sensitive company data
- Access financial information
- See customer details across all companies
- Bypass company-level authorization checks