Daniel Supernault 6 роки тому
батько
коміт
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');
+	}
 }