1
0
Daniel Supernault 6 жил өмнө
parent
commit
884f675d30
1 өөрчлөгдсөн 10 нэмэгдсэн , 0 устгасан
  1. 10 0
      app/Activity.php

+ 10 - 0
app/Activity.php

@@ -7,4 +7,14 @@ use Illuminate\Database\Eloquent\Model;
 class Activity extends Model
 {
     protected $dates = ['processed_at'];
+
+	public function toProfile()
+	{
+		return $this->belongsTo(Profile::class, 'to_id');
+	}
+
+	public function fromProfile()
+	{
+		return $this->belongsTo(Profile::class, 'from_id');
+	}
 }