belongsTo(Identity::class, 'identity_id'); } public function logs() { return $this->hasMany(IdentityLog::class, 'user_id', 'user_id'); } public function user() { return $this->belongsTo(config('user_account.user_model'))->withDefault(); } public function getEmptyTextAttribute() { $info = IdentityLog::where('channel', 'EmptyUp')->first(); if ($info) { return "是"; } else { return "否"; } } }