belongsTo(Project::class); } public function customer() { return $this->belongsTo(User::class, 'customer_id'); } public function partner() { if ($this->in_out == 1) { return $this->belongsTo(Customer::class, 'customer_id'); } return $this->belongsTo(Vendor::class, 'customer_id'); } public function type() { return paymentTypes($this->type_id); } }