小编Lov*_*ngh的帖子

在 Laravel 中找不到驱动程序

当我运行php artisan migrate命令它输出

在 Connection.php 第 664 行:
找不到驱动程序(SQL:select * from information_schema.tables where table_schema = employee and table_name = migrations)
在 PDOConnection.php 第 47 行:找不到驱动程序在 PDOConnection.php 第 43 行:找不到找司机

而且我还使用 ubuntu 16 和 PHP 版本 7.2.8 和 laravel 5.5 为 mysql、pgsql、sqlite im 启用了 pdo

php pdo laravel-5.5

3
推荐指数
2
解决办法
1万
查看次数

2dsphere 不是路径`index` 处的有效类型

我在猫鼬中有 2 个模式,如下所示:

点架构.js

const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const PointSchema = new mongoose.Schema({
  type: {
    type: String,
    enum: ['Point']
  },
  coordinates: {
    type: [Number]
  },
  index: {
    type: '2dsphere',
    sparse: true
  }
});

module.exports = {
  PointSchema
};
Run Code Online (Sandbox Code Playgroud)

设备架构.js

const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const PointSchema = require('./PointSchema').PointSchema;

const DeviceSchema = mongoose.Schema({
  name: String,
  location: {
    type: PointSchema,
    default: null
  }
}, {
  collection: 'devices',
  timestamps: {
    createdAt: 'created_at',
    updatedAt: 'updated_at'
  }
}); …
Run Code Online (Sandbox Code Playgroud)

mongoose node.js

2
推荐指数
1
解决办法
523
查看次数

如何在NodeJS和MongoDB中托管网站?那会有什么代价?

作为NodeJS和Mongo DB的新成员,我对它的托管和定价了解不多.我可以在自己的物理服务器/机器上自己托管网站.还有任何托管网站提供配置Node JS和MongoDb的工具.

web-hosting mongodb node.js

1
推荐指数
1
解决办法
5418
查看次数

标签 统计

node.js ×2

laravel-5.5 ×1

mongodb ×1

mongoose ×1

pdo ×1

php ×1

web-hosting ×1