SN
groups where user_id = 1 and 0 = 1)Size: a a a
SN
groups where user_id = 1 and 0 = 1)SN
AH

return $this->belongsTo(Group::class)либо
->where('user_id', Auth::id());
return $this->belongsTo(Group::class)
->where('user_id', Auth::id())
->withPivot();
SN
return $this->belongsTo(Group::class)либо
->where('user_id', Auth::id());
return $this->belongsTo(Group::class)
->where('user_id', Auth::id())
->withPivot();
SN
AH
SN
SN
SN
🎃
AH
AH
SN
AH
AH
SN
SN

AH
$course->group->id, то есть к родительской записи.SN
SN