Php 无法获取插入到我的数据库表中的时间戳值
在我使用迁移创建的数据库“users”表中有一个名为“join”的列Php 无法获取插入到我的数据库表中的时间戳值,php,mysql,laravel,timestamp,Php,Mysql,Laravel,Timestamp,在我使用迁移创建的数据库“users”表中有一个名为“join”的列 Schema::create('users',function(Blueprint $table){ $table->increments('user_id'); $table->string('username',100); $table->string('password',300); $table-
Schema::create('users',function(Blueprint $table){
$table->increments('user_id');
$table->string('username',100);
$table->string('password',300);
$table->string('full_name',100);
$table->string('email',100);
$table->timestamp('joined');
});
但每当我尝试在表中插入用户时,就会出现以下错误
SQLSTATE[42S22]:未找到列:中的1054未知列“updated_at”
“字段列表”(SQL:插入到用户(用户名,密码,),
全名
,电子邮件
,加入
,更新
,创建
)值
(阿尔扎米,y$ckR7d.Pt05QRNZXXRGkoOuWDTZAxtDiQ0XA4O2UktSuBd244Oc3qe,al)
扎米·拉赫曼,阿尔扎米。shimanta@gmail.com, 20-03-16 10-37-11, 2016-03-20
10:37:112016-03-20 10:37:11)
在我的userController中,我有以下功能在数据库中插入新用户
$user=new User();
$user->username=$request->username;
$user->password=bcrypt($request->password);
$user->full_name=$request->full_name;
$user->email=$request->email;
$user->joined=date('d-m-y H-i-s');
$user->save();
Eloquent试图访问不存在的timesptamps。尝试在用户
模型中声明public$timestamps=false