我已经从 git 存储库下载了我的品牌项目,并打算像往常一样初始化它,但这次我遇到了在相同条件下从未发生过的错误:
composer install
In Connection.php line 795:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ibbrdb.boards' doesn't exist (Connection: mysql, SQL: select * from `boards` order by `ordem` asc)
In Connection.php line 416:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ibbrdb.boards' doesn't exist
我的 Ibbr 应用程序中确实有一个模型板,但是我什至没有迁移数据库,因为我的第一步是运行
composer install
。我在 stackoverflow 中看到了一些类似的问题,人们建议在之前运行 composer dump-autoload
并从composer.json 中删除 post-autoload-dump。它们都不起作用,因为实际上我运行的每个 composer
或 php artisan
命令都因此错误而失败。这里会发生什么?
重现步骤:
1 使用上面的链接下载存储库:
git clone https://github.com/FabioNevesRezende/Imageboard
2 创建mysql数据库、用户并相应配置.env
3 尝试安装
composer install
编辑我知道会发生什么。在我的
routes/web.php
中,我包含了一个 ServiceProvider Funcoes:
use Ibbr\Helpers\Funcoes;
Route::get('/{siglaBoard}', ['uses' => 'PagesController@getBoard'])
->where('siglaBoard', Funcoes::geraRegexBoards());
在里面
geraRegexBoards
我做了一个Board::orderBy
。然而,这之前并没有产生任何错误,我有这个项目超过 5 年了,但这种情况从未发生过。