라라벨에서 BelongsToHasOne과 HasOne의 차이점은 무엇입니까? 누가 나에게 주요 차이점이 무엇인지 말해줄 수 있습니까? BelongsTo and HasOne 관계를 웅변적으로 표현합니다.주요 차이점은 관계의 어느 쪽이 관계의 외부 키를 보유하고 있느냐입니다.호출하는 모델$this->belongsTo()소유한 모델입니다.one-to-one그리고.many-to-one관계 및 소유 모델의 키를 보유합니다. 일대일 관계의 예: class User extends Model { public function car() { // user has at maximum one car, // so $user->car will return a single model return $this->hasOne('Car'..