报告一个文档错误 [ 技术分享 ]
2.0文档中关于“数据迁移”,下面的代码与官方网站不一样,运行会出错:
$this->createTable('news', [
'id' => Schema::primaryKey(),
'title' => Schema::string()->notNull(),
'content' => Schema::text(),
]);
正确应为: $this->createTable('news', [
'id' => $this->primaryKey(),
'title' => $this->string()->notNull(),
'content' => $this->text(),
]);
共 0 条回复
没有找到数据。
thickas
注册时间:2016-01-01
最后登录:2016-01-01
在线时长:0小时4分
最后登录:2016-01-01
在线时长:0小时4分
- 粉丝0
- 金钱10
- 威望0
- 积分10