hasOne(Company::class, 'id', 'uid'); } public function getEndtimeAttribute($value) { return $value == 0?'永久':date('Y-m-d H:i:s', $value); } }