定制 zillur-web/laravel-web-terminal 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zillur-web/laravel-web-terminal

最新稳定版本:v1.0.1

Composer 安装命令:

composer require zillur-web/laravel-web-terminal

包简介

Secure web-based Laravel Artisan terminal for browser

README 文档

README

A secure web-based Artisan terminal for Laravel applications.

Laravel Web Terminal allows you to run selected Artisan commands directly from your browser with proper security and command whitelisting.

✨ Features

  • Run selected Artisan commands from browser
  • Command whitelist protection
  • Configurable route prefix
  • Middleware protection (web + CSRF)
  • Optional secret token for security (login-free access)
  • Publishable configuration file and views
  • Laravel auto-discovery support
  • Compatible with Laravel 8 → 12
  • Compatible with PHP 8.0 → 8.5

📦 Installation

Install via Composer:

composer require zillur-web/laravel-web-terminal

⚙️ Publish Configuration

php artisan vendor:publish --tag=web-terminal-config

Optional: Publish views

php artisan vendor:publish --tag=web-terminal-views

🚀 Usage

Visit /terminal route to access the terminal.

Optional secret token is required for access (login-free)

Token can be passed via query string or header (X-WEB-TERMINAL-TOKEN)

Example: /terminal?token=laravel-web-terminal

Or in JavaScript headers:

headers: {
    "X-WEB-TERMINAL-TOKEN": "laravel-web-terminal"
}

🔐 Security

For security reasons, only commands listed in the configuration file are allowed.

Example config:

'allowed_commands' => [
    'migrate',
    'cache:clear',
    'config:clear',
    'route:clear',
    'queue:restart',
],

It is strongly recommended to use authentication middleware in production.

⚙️ Configuration

Config file: config/web-terminal.php

return [

    // Route prefix
    'prefix' => 'terminal',

    // Middleware
    'middleware' => ['web'],

    // Allowed artisan commands
    'allowed_commands' => [
        'migrate',
        'cache:clear',
        'config:clear',
        'route:clear',
        'queue:restart',
    ],

    // Optional secret token for security (login-free access)
    'access_token' => env('WEB_TERMINAL_TOKEN', 'laravel-web-terminal'),

];

🖥 Requirements

  • PHP 8.0 → 8.5
  • Laravel 8 → 12

🤝 Contributing

Contributions are welcome. Feel free to submit a pull request.

📄 License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固