'array' ]; public function type(){ return $this->hasOne(ProductType::class,'id','type'); } public function user(){ return $this->hasOne(User::class,'id','user_id'); } }