AffiliateLog.php 503 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class AffiliateLog extends Model
  5. {
  6. // protected $fillable = [
  7. // 'user_id','referred_by_user','amount','note','order_id'
  8. // ];
  9. public function user()
  10. {
  11. return $this->belongsTo(User::class);
  12. }
  13. public function order_detail()
  14. {
  15. return $this->belongsTo(OrderDetail::class);
  16. }
  17. public function order()
  18. {
  19. return $this->belongsTo(Order::class, 'order_id');
  20. }
  21. }