-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
我的环境:
"require": {
"php": "^8.2",
"doctrine/dbal": "^4.0",
"laravel-lang/lang": "^15.26",
"laravel/framework": "^12.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.10.1",
"php-panel/laravel-admin": "^3.0"
},
MySQL 8.0
Ubuntu 24
按照https://laravel-admin.org/docs/zh/1.x/installation文档,已成功执行以下命令:
php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"
php artisan admin:install
但是创建控制器,报错如下:
$ php artisan admin:make UserController --model='App\Models\User'
BadMethodCallException
Method Illuminate\Database\MySqlConnection::isDoctrineAvailable does not exist.
at vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:115
111▕ */
112▕ public function __call($method, $parameters)
113▕ {
114▕ if (! static::hasMacro($method)) {
➜ 115▕ throw new BadMethodCallException(sprintf(
116▕ 'Method %s::%s does not exist.', static::class, $method
117▕ ));
118▕ }
119▕
+19 vendor frames
20 artisan:16
Illuminate\Foundation\Application::handleCommand()
本人已问过谷歌和AI,都没有解决这个问题,所以提一个议题问一下大佬们该怎么解决这个问题?