gpt4 book ai didi

laravel - "backup"命名空间中没有定义命令

转载 作者:行者123 更新时间:2023-12-04 17:46:39 27 4
gpt4 key购买 nike

我已经尝试为数据库安装 Laravel Backup paulvl/backup

我已按照有关如何将其安装和配置到我的 Laravel 应用程序的说明进行操作。然而,我被困在你实际运行备份命令的地方。我收到此错误:

$ php artisan backup:mysql-dump               
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "backup" namespace.

非常感谢任何帮助

这是 config/app.php 中的提供程序数组 Provider Array in config/app.php

最佳答案

来自 the package docs :

Once the package's installation completes, the final step is to add the service provider. Open config/app.php, and add a new item to the providers array:

Backup\BackupServiceProvider::class,

BackupServiceProvider does that 以来,这些命令将自动注册:

public function register()
{
$this->registerMysqlDumpCommand();
$this->registerMysqlRestoreCommand();
}

关于laravel - "backup"命名空间中没有定义命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48205325/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com