tomatophp/filament-artisan

用于运行 FilamentPHP 的某些 artisan 命令的简单但功能强大的库

v1.1.4 2024-09-17 16:34 UTC

This package is auto-updated.

Last update: 2024-09-17 16:35:22 UTC


README

Screenshot

Filament Artisan 命令运行器

Latest Stable Version License Downloads

用于运行 FilamentPHP 的某些 artisan 命令的简单但功能强大的库

屏幕截图

Commands List Commands Form Commands Output

安装

composer require tomatophp/filament-artisan

最后,在 /app/Providers/Filament/AdminPanelProvider.php 上注册插件

->plugin(\TomatoPHP\FilamentArtisan\FilamentArtisanPlugin::make())

运行命令

默认情况下,您只能在本地环境中访问此页面。如果您愿意,可以更改配置中的 local 键。

简单地去到 http://you-domain.com/PANEL/artisan,然后我们就可以开始了!从列表中选择所需的命令,填写参数和选项/标志,然后点击 运行 按钮。

配置

默认配置为

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

];

现在清除缓存

php artisan optimize:clear

发布资产

您可以使用此命令发布配置文件

php artisan vendor:publish --tag="filament-artisan-config"

您可以使用此命令发布视图文件

php artisan vendor:publish --tag="filament-artisan-views"

您可以使用此命令发布语言文件

php artisan vendor:publish --tag="filament-artisan-lang"

其他 Filament 包

查看我们的 Awesome TomatoPHP