ProfileMigration.php 452 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use App\Profile;
  6. class ProfileMigration extends Model
  7. {
  8. use HasFactory;
  9. protected $guarded = [];
  10. public function profile()
  11. {
  12. return $this->belongsTo(Profile::class, 'profile_id');
  13. }
  14. public function target()
  15. {
  16. return $this->belongsTo(Profile::class, 'target_profile_id');
  17. }
  18. }