My friend has spent the night at my home in the past.
<友達が一人泊まりにきた場合>
*My friend has stayed at my house before.
「友達がうちに泊まりに来たことがあります。」
has stayed at my house で「うちに泊まりに来た」と言えます。
*My friend has spent the night at my home in the past.
has spent the night at my home「うちで一晩過ごした」のようにも言えます。
<友達が複数泊まりにきた場合>
*Some of my friends have stayed at my house before.
「友達が何人か泊まりに来たことがある。」
*I have had friends spend the night at my house in the past.
have had friends spend the night at my house のようにも言えます。
ご参考まで!