zwartpet/command-ui 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

zwartpet/command-ui

最新稳定版本:1.0.2

Composer 安装命令:

composer require zwartpet/command-ui

包简介

Run laravel commands from a web page

README 文档

README

Latest Version on Packagist Test

Add an admin interface where you can run Laravel commands without the need to SSH into the server.

Installation

You can install the package via composer:

composer require zwartpet/command-ui

Publish the assets

php artisan vendor:publish --tag=command-ui-assets

Usage

The UI is available on the /command-ui route, configurable with COMMAND_UI_URI in your .env file.

The route is protected with a Laravel Gate named command-ui which you can customize with COMMAND_UI_GATE in your .env file. Create the gate by adding the following to your AuthServiceProvider, not adding this will result in a 404 error when visiting the route.

Gate::define('command-ui', function (User $user) {
    return $user->isAdmin; // or any other logic
});

Configuration

This library is plug and play and works out of the box. There are some configuration options available.

The list of commands is filtered by a blacklist or whitelist, by default the blacklist is used.
Publish the configuration to change the lists to your needs.

php artisan vendor:publish --tag=command-ui-config

For all the configuration options see the config file.

Testing

Pest

composer test

Pint

composer test:lint

PHPStan

composer test:types

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

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