feat : 내 정보 조회 API 추가
This commit is contained in:
@@ -11,7 +11,7 @@ class Member extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, Notifiable, TwoFactorAuthenticatable;
|
||||
|
||||
protected $primaryKey = 'mb_id'; // 기본 키 변경
|
||||
protected $primaryKey = 'mb_num'; // 기본 키 변경
|
||||
|
||||
protected $fillable = [
|
||||
'mb_id', 'mb_pass', 'mb_name', 'mb_phone', 'mb_mail',
|
||||
@@ -36,4 +36,10 @@ public function getAuthIdentifierName()
|
||||
{
|
||||
return 'mb_id'; // 기본 로그인 필드를 mb_id로 변경
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(MemberCompany::class, 'tn_num', 'mc_num');
|
||||
// members.tn_num = member_company.mc_num
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user