hasOne(Product::class,'product_id','type_id'); } public function user() { return $this->hasOne(User::class, 'uid', 'uid'); } }