<?php
namespace App;
use IlluminateDatabaseEloquentModel;
class Admin extends Model{
//指定表名
protected $table = 'wd_user';
//指定允许批量复制的字段
protected $fillable = ['username'];
//指定id
protected $primaryKey = 'uid';
//自动维护时间戳
public $timestamps = true;
//获取时间格式
protected function getDateFormat()
{
return time();
}
//获取时间戳
protected function asDateTime($val)
{
return $val;
}
}