norman-huth/find-command

1.1.1 2024-06-06 06:38 UTC

This package is auto-updated.

Last update: 2024-09-06 07:16:19 UTC


README

为框架 Symfony ^6.2|^7.0+Laravel ^10.0|^11.0+ 提供的第三方命令。
此命令可用于在 Symfony 或 Laravel 应用程序中搜索其他命令。
它底层使用 Laravel Prompts

preview

安装

composer require norman-huth/find-command

用法

Laravel

运行命令。

php artisan find

Symfony

在您的应用程序中注册 \NormanHuth\FindCommand\SymfonyFindCommand 并运行命令。

php bin/console find
排除命令

将方法 exceptFromFindCommand 添加到命令中

class MyCommand extends Command
{
    /**
     * Except this command from the find command.
     */
    public function exceptFromFindCommand(): bool
    {
        return true;
    }
class MyCommand extends Command
{
    /**
     * Except this command from the find command.
     */
    public function exceptFromFindCommand(): bool
    {
        return config('app.env') != 'local';
    }
也在参数和选项描述中搜索
php artisan find --deep
php bin/console find --deep

preview