Download the PHP package sajidifti/laravel-command-center without Composer
On this page you can find all versions of the php package sajidifti/laravel-command-center. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sajidifti/laravel-command-center
More information about sajidifti/laravel-command-center
Files in sajidifti/laravel-command-center
Package laravel-command-center
Short Description Laravel Command Center - A database-independent command center for Laravel applications with emergency access capabilities
License MIT
Informations about the package laravel-command-center
Laravel Laravel Command Center
A database-independent Laravel Command Center for Laravel applications that works even when your database is down. Perfect for emergency maintenance, system management, and troubleshooting.
Features
- ✅ Zero Database Dependency - Works even when database is unavailable
- ✅ File-Based Sessions - Independent session management
- ✅ Prebuilt Assets - No NPM/Vite required
- ✅ Emergency Access - Manage your app during outages
- ✅ Artisan Commands - Execute commands via web interface
- ✅ Environment Management - Edit .env variables through UI
- ✅ Maintenance Mode - Toggle with bypass URL generation
- ✅ System Information - View PHP, Laravel, and server details
- ✅ Standalone Auth - Uses .env credentials, no database needed
Installation
Option 1: Install from Packagist (Production)
For production use, install the package from Packagist:
Then run the installation command:
The installer will guide you through an interactive setup process, asking you to:
- Publish configuration file (default: Yes)
- Publish compiled assets (default: Yes)
- Add environment variables to
.envand.env.example(default: Yes)
For each environment variable, you'll be prompted with secure defaults:
- Route Prefix: Includes a randomly generated secret path
- Username: Default is
admin - Password: Randomly generated 16-character password
- Session Lifetime: Default is
120minutes
Option 2: Install for Local Development
For local development or contributing to the package:
-
Clone or add the package to your Laravel project:
-
Add the local repository to your root
composer.json: -
Install the package:
- Run the installation command:
Accessing the Command Center
After installation, the command will display your access URL. Navigate to the route prefix you configured (e.g., https://yourdomain.com/command-center/somesecret) and login with the credentials you set during installation.
Security Note: Your route prefix includes a random secret path for security. Keep this URL private and use HTTPS in production.
Available Commands
command-center:install
Interactive installation wizard that guides you through setting up the Laravel Command Center.
Interactive Mode (Default)
Simply run the command and answer the prompts:
You'll be asked:
- Publish configuration file? (yes/no) [yes]
- Publish compiled assets (CSS/JS)? (yes/no) [yes]
- Add environment variables to .env (and .env.example)? (yes/no) [yes]
If you choose to add environment variables, you'll be prompted for:
- Route Prefix: Default includes a random secret (e.g.,
command-center/somesecret) - Username: Default is
admin - Password: Hidden input, defaults to a random 16-character string
- Session Lifetime: Default is
120minutes
Flag-Based Mode
Skip interactive prompts by using flags to install only specific components:
Note: The --only-* flags are mutually exclusive. When you use one, only that specific component will be installed. To install multiple components, run the command multiple times or use interactive mode.
Full Installation Mode (Non-Interactive)
For automated deployments or CI/CD pipelines:
This will:
- Publish configuration file
- Publish compiled assets
- Add environment variables with secure random defaults
- No user interaction required
What Happens When You Skip Steps
If you answer "no" to any step, the installer will show you manual instructions:
Skipped Config:
Skipped Assets:
Skipped Environment Variables:
command-center:clean-sessions
Cleans up expired session files from the command center's file-based session storage.
What it does:
- Scans
storage/framework/management_sessions/ - Removes expired session files
- Reports number of sessions cleaned
When to use:
- Periodically to free up disk space
- If experiencing session-related issues
- Can be added to Laravel's scheduler for automatic cleanup
Manual Publishing (Advanced)
You can also manually publish specific components using Laravel's vendor:publish command:
Configuration
The package is configured via config/command-center.php. After installation, you can customize various aspects of the Command Center.
Basic Configuration
Customizable Features
The configuration file includes several customizable sections:
System Information Items
Customize which system information is displayed on the dashboard:
Environment Settings Categories
Define which environment variables are editable through the UI:
Command Sections
Organize and customize available Artisan commands:
Allowed Commands
For security, only whitelisted commands can be executed:
Note: Any command you add to
command_sectionsmust also be added toallowed_commandsfor security validation.
Usage
Accessing the Command Center
- Navigate to your configured route prefix (e.g.,
https://yourdomain.com/command-center/somesecret) - Login with credentials from
.env - Use the interface to manage your application
Features Available
System Information
- PHP Version
- Laravel Version
- Environment Mode
- Debug Status
- Database Connection
Artisan Commands
- Optimization commands (cache, config, routes)
- Clear cache commands
- Database migrations
- Queue management
- Custom commands
Environment Management
- Edit .env variables through secure UI
- Grouped by category (App, Database, Mail, etc.)
- Safe updates with confirmation
Maintenance Mode
- Toggle maintenance mode on/off
- Generate secure bypass URLs
- Copy bypass URL to clipboard
How It Works
Database Independence
The Laravel Command Center is completely independent of your application's database:
- File-Based Sessions: Uses its own session storage in
storage/framework/management_sessions/ - No Web Middleware: Bypasses Laravel's database-dependent middleware
- Standalone Routes: Loads without web middleware group
- No Database Queries: Authentication uses .env, not database
Security Features
- ✅ Customizable route prefix
- ✅ Environment-based credentials
- ✅ File-based authentication
- ✅ HTTPOnly session cookies
- ✅ CSRF protection
- ✅ Secure password handling
Requirements
- PHP 8.2 or higher
- Laravel 11.x or 12.x
- Write permissions for
storage/framework/management_sessions/
Prebuilt Assets
This package ships with prebuilt Tailwind CSS v4 in the public directory, so consumers do not need Node.js or NPM to use the package in production.
Development / Rebuilding Assets
If you need to modify the frontend and rebuild the assets, the package includes a Vite + Tailwind v4 build setup. From the package root run:
The build writes compiled JS/CSS into the package public directory. After building, publish the package assets into your application with:
Notes:
- The package
package.jsonand build config are intended for package maintainers - Built assets should be committed to the package
publicfolder so consumers don't need a build step - The build outputs are placed in
public/jsandpublic/cssinside the package - Assets are published to
public/vendor/laravel-command-center/by the service provider
Troubleshooting
Command Center Not Loading
- Check that route prefix is correct in
.env - Clear config cache:
php artisan config:clear - Verify storage permissions:
storage/framework/management_sessions/needs to be writable
Session Issues
Assets Not Loading
Cannot Access During Database Outage
This is the main feature! The command center should work even when:
- Database is down
- Tables don't exist
- Connection fails
- During migrations
If it's not working, check your view composers aren't querying the database.
Advanced Configuration
Custom Session Path
Custom Middleware
Register additional middleware in bootstrap/app.php:
Scheduled Session Cleanup
Add to your routes/console.php or scheduler:
Security Best Practices
- Change Default Route: Use a unique, hard-to-guess route prefix
- Strong Credentials: Use strong username and password
- HTTPS Only: Always use HTTPS in production
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see License File for more information.
Credits
- Md. Sajid Anam Ifti
- All Contributors
Support
For support, email [email protected] or open an issue on GitHub.
All versions of laravel-command-center with dependencies
illuminate/support Version ^12.0
blade-ui-kit/blade-heroicons Version ^2.6