friendsofcat/artisan-gui

为酷炫的孩子们设计的 [laravel:artisan] gui 美丽包。

安装: 9,573

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分叉: 55

语言:Vue

1.0.0 2023-03-24 15:11 UTC

This package is not auto-updated.

Last update: 2024-09-21 20:38:40 UTC


README

此包现在处于非常缓慢的开发中。它没有被遗弃,您仍然可以使用它。

目前,已经开始开发新的包。 #34

Artisan GUI

:artisan gui

Packagist License Packagist Version Packagist Downloads Packagist PHP Version Support GitHub code size in bytes

简单但功能强大的库,用于运行一些 artisan 命令。

要求

  • Laravel 8.*
  • php ^7.3

安装

仅安装包

composer require infureal/artisan-gui

安装 2.0.0@beta

composer require infureal/artisan-gui:2.0.0@beta

供应商发布

默认情况下,包具有预定义的配置、内联样式和脚本。从版本 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 中的新功能

  • 迁移到 SPA/Vue
  • UI 更改为更易于阅读(在我看来)
  • 实现搜索(有了新的设计,没有搜索很难找到一些命令)
  • 添加了配置的权限字段(以实现更灵活的调整)
  • 添加了数组选项字段

配置

默认配置是

<?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' => [
        // ...
    ]

];

问题

如果您有任何问题,请 告诉我