Преглед изворни кода

Update ProfileMigration model, add target relation

Daniel Supernault пре 1 година
родитељ
комит
3f0539978e
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      app/Models/ProfileMigration.php

+ 5 - 0
app/Models/ProfileMigration.php

@@ -16,4 +16,9 @@ class ProfileMigration extends Model
     {
         return $this->belongsTo(Profile::class, 'profile_id');
     }
+
+    public function target()
+    {
+        return $this->belongsTo(Profile::class, 'target_profile_id');
+    }
 }