astamiir / laravel-web-terminal
A web-based terminal for Laravel applications, allowing to run Artisan commands directly from your browser.
Requires
- php: ^8.2
README
A web-based terminal for Laravel applications, allowing you to run Artisan commands directly from your browser. Perfect for development and debugging purposes.
Disclaimer: Use with caution and avoid using in production environments without proper security measures.
Init package
composer require astamiir/laravel-web-terminal
Publish the assets and configuration
php artisan vendor:publish --tag=laravel-web-terminal-assets
php artisan vendor:publish --tag=laravel-web-terminal-config
Usage
To access the web terminal, navigate to /web-terminal in your Laravel application and you will see a terminal interface where you can run Artisan commands.
Configuration
Make sure that you have enabled terminal in the .env file:
WEB_TERMINAL_ENABLED=true
Also you can specify allowed commands:
WEB_TERMINAL_ALLOWED_COMMANDS=migrate, db:seed, cache:clear
And specify allowed environments:
WEB_TERMINAL_ENVIRONMENTS=local,staging
Leave it empty to allow all commands.
You can customize the terminal settings in the config/laravel-web-terminal.php file.