webman-php / admin

admin plugin for webman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

登录的时候报错

halay opened this issue · comments

commented

Call to a member function connection() on null 请问这是什么原因呢?我的config/database.php 数据库我是读的.env文件,这个是什么问题,要怎么解决

commented

Error: Call to a member function connection() on null in /opt/webman/vendor/illuminate/database/Eloquent/Model.php:1653
Stack trace:
#0 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(1619): Illuminate\Database\Eloquent\Model::resolveConnection()
#1 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(1425): Illuminate\Database\Eloquent\Model->getConnection()
#2 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(1342): Illuminate\Database\Eloquent\Model->newBaseQueryBuilder()
#3 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(1378): Illuminate\Database\Eloquent\Model->newModelQuery()
#4 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(1331): Illuminate\Database\Eloquent\Model->newQueryWithoutScopes()
#5 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(2132): Illuminate\Database\Eloquent\Model->newQuery()
#6 /opt/webman/vendor/illuminate/database/Eloquent/Model.php(2144): Illuminate\Database\Eloquent\Model->__call()
#7 /opt/webman/plugin/admin/app/controller/AccountController.php(75): Illuminate\Database\Eloquent\Model::__callStatic()
#8 /opt/webman/vendor/workerman/webman-framework/src/App.php(319): plugin\admin\app\controller\AccountController->login()
#9 /opt/webman/vendor/workerman/webman-framework/src/App.php(349): Webman\App::Webman{closure}()
#10 /opt/webman/plugin/admin/app/middleware/AccessControl.php(47): Webman\App::Webman{closure}()
#11 /opt/webman/vendor/workerman/webman-framework/src/App.php(341): plugin\admin\app\middleware\AccessControl->process()
#12 /opt/webman/vendor/workerman/webman-framework/src/App.php(168): Webman\App::Webman{closure}()
#13 /opt/webman/vendor/workerman/workerman/Connection/TcpConnection.php(646): Webman\App->onMessage()
#14 [internal function]: Workerman\Connection\TcpConnection->baseRead()
#15 /opt/webman/vendor/workerman/workerman/Events/Event.php(193): EventBase->loop()
#16 /opt/webman/vendor/workerman/workerman/Worker.php(1635): Workerman\Events\Event->loop()
#17 /opt/webman/vendor/workerman/workerman/Worker.php(1426): Workerman\Worker::forkOneWorkerForLinux()
#18 /opt/webman/vendor/workerman/workerman/Worker.php(1400): Workerman\Worker::forkWorkersForLinux()
#19 /opt/webman/vendor/workerman/workerman/Worker.php(560): Workerman\Worker::forkWorkers()
#20 /opt/webman/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\Worker::runAll()
#21 /opt/webman/start.php(4): support\App::run()
#22 {main}

commented

php 版本PHP 8.1.21