1
0

FollowRequest.php 613 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class FollowRequest extends Model
  5. {
  6. protected $fillable = ['follower_id', 'following_id'];
  7. public function follower()
  8. {
  9. return $this->belongsTo(Profile::class, 'follower_id', 'id');
  10. }
  11. public function following()
  12. {
  13. return $this->belongsTo(Profile::class, 'following_id', 'id');
  14. }
  15. public function actor()
  16. {
  17. return $this->belongsTo(Profile::class, 'follower_id', 'id');
  18. }
  19. public function target()
  20. {
  21. return $this->belongsTo(Profile::class, 'following_id', 'id');
  22. }
  23. }