新增traits方法
This commit is contained in:
parent
3e0717c339
commit
cffcf11192
@ -75,4 +75,27 @@ trait BaseOptionsTrait
|
||||
{
|
||||
return static::onlyTrashed()->find($id)->restore();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取删除字段
|
||||
*
|
||||
* @time 2020年01月13日
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDeleteAtField()
|
||||
{
|
||||
return $this->deleteTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*
|
||||
* @time 2020年01月13日
|
||||
* @param $field
|
||||
* @return string
|
||||
*/
|
||||
public function aliasField($field): string
|
||||
{
|
||||
return sprintf('%s.%s', $this->getTable(), $field);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user