<?php
namespace App;

use Illuminate\Database\Eloquent\Model;

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;
}
}

相关文章:

  • 2022-02-17
  • 2021-12-07
  • 2022-01-15
  • 2021-06-15
  • 2022-12-23
  • 2022-02-07
  • 2022-01-31
  • 2022-12-23
猜你喜欢
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-04-29
相关资源
相似解决方案