【发布时间】:2015-12-31 18:12:14
【问题描述】:
我不明白为什么我的时间戳没有价值...
患者数据迁移文件
public function up()
{
Schema::create('patients', function (Blueprint $table) {
$table->increments('pID');
$table->string('pName');
$table->string('pAddress');
$table->string('pBday');
$table->string('pPhone');
$table->string('pEcon');
$table->timestamps();
});
}
我的数据库
我将 created_at 列更改为 pDreg
我检查了所有内容,我确信我的代码是正确的.. 但我仍然没有得到任何值
【问题讨论】:
-
如果时间戳应该设置为当前日期和时间,你应该使用
CURR_TIMESTAMP作为默认值,phpmyadmin在默认值的下拉列表中给出这个选项 -
成功了!非常感谢:)
-
我将把它作为未来人的答案