laravel-5.1 - Laravel 5.1 : Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found

标签 laravel-5.1

我正在使用 laravel 5.1,我正在尝试执行 migrate:refresh,我收到一个错误:

Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found in ../vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php

[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found



我的 composer.json 中已经需要 Doctrine/dbal
 "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "Doctrine/dbal": "^2.5"
    }

所以我想问一下我的laravel项目有什么问题。

最佳答案

From the official docs :

Before modifying a column, be sure to add the doctrine/dbal dependency to your composer.json file. The Doctrine DBAL library is used to determine the current state of the column and create the SQL queries needed to make the specified adjustments to the column:

composer require doctrine/dbal

关于laravel-5.1 - Laravel 5.1 : Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33002659/

相关文章:

mysql - Laravel 5.1 DBQuery 连接

php - 构建自定义 Laravel 数据库适配器

php - laravel5.1 使用 Eloquent 检索不直接相关的嵌套属性

php - Laravel 自定义验证消息参数

php - 为外部 API 调用创建包装器

php - Laravel 5.1 - 将成功 session 传递给助手

Laravel 数组验证消息值

php - 登录表单 POST 上的 Laravel 5.1 token 不匹配

php - Laravel 与 Webix 数据表编辑的集成

php - 无法在 laravel 5.1 中使用外观调用方法