fix:scope chat history for each user

This commit is contained in:
hackerESQ
2024-11-03 08:41:14 -06:00
parent dec253d860
commit b97a41f7ad
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ class Portfolio extends Model
*/
public function chats()
{
return $this->morphMany(AiChat::class, 'chatable');
return $this->morphMany(AiChat::class, 'chatable')->where('user_id', auth()->user()->id);
}
public function scopeMyPortfolios()