tachii / artisan-gui
为酷孩子们设计的 [laravel:artisan] gui 的精美包。
v3.1.2
2024-01-18 21:39 UTC
Requires
- php: ^7.3|^8.0
- laravel/framework: ^8.0|^9.0|^10.0
Replaces
This package is auto-updated.
Last update: 2024-08-29 15:44:29 UTC
README
将原始 artisan-gui 包更新为与 Laravel 10 & PHP8.3 兼容
旧版本仍可在 infureal/artisan-gui 获取
:artisan gui
运行一些 artisan 命令的简单但功能强大的库。
需求
- Laravel 10.*
- PHP ^8
安装
只需安装包
composer require Tachii/artisan-gui
供应商发布
默认情况下,包包含预定义的配置、内联样式和脚本。从版本 1.4
开始,您可以在 vendor/artisan-gui
中发布供应商,如 CSS 和 JS 文件。
php artisan vendor:publish --provider="Infureal\Providers\GuiServiceProvider"
仅发布配置
php artisan vendor:publish --tag="artisan-gui-config"
仅发布样式和脚本
php artisan vendor:publish --tag="artisan-gui-css-js"
运行命令
默认情况下,您只能在本地环境中访问此页面。如果您愿意,可以更改配置中的 local
键。
只需访问 http://you-domain.com/~artisan
,然后我们就可以开始了!从列表中选择所需的命令,填写参数和选项/标志,然后点击 运行
按钮。
v2 中的新功能
配置
默认配置为
<?php return [ /* |-------------------------------------------------------------------------- | Middleware list for web routes |-------------------------------------------------------------------------- | | You can pass any middleware for routes, by default it's just [web] group | of middleware. | */ 'middlewares' => [ 'web', // 'auth' ], /* |-------------------------------------------------------------------------- | Route prefix |-------------------------------------------------------------------------- | | Prefix for gui routes. By default url is [/~artisan-gui]. | For your wish you can set it for example 'my-'. So url will be [/my-artisan-gui]. | | Why tilda? It's selected for prevent route names correlation. | */ 'prefix' => '~', /* |-------------------------------------------------------------------------- | Home url |-------------------------------------------------------------------------- | | Where to go when [home] button is pressed | */ 'home' => '/', /* |-------------------------------------------------------------------------- | Only on local |-------------------------------------------------------------------------- | | Flag that preventing showing commands if environment is on production | */ 'local' => true, /* |-------------------------------------------------------------------------- | List of command permissions |-------------------------------------------------------------------------- | | Specify permissions to every single command. Can be a string or array | of permissions | | Example: | 'make:controller' => 'create-controller', | 'make:event' => ['generate-files', 'create-event'], | */ 'permissions' => [ ], /* |-------------------------------------------------------------------------- | List of commands |-------------------------------------------------------------------------- | | List of all default commands that has end of execution. Commands like | [serve] not supported in case of server side behavior of php. | Keys means group. You can shuffle commands as you wish and add your own. | */ 'commands' => [ // ... ] ];