Browse Source

关联增加withTrashed

master
李可松 4 years ago
parent
commit
076cb0ee09
  1. 4
      app/Models/IndustryOrder.php

4
app/Models/IndustryOrder.php

@ -25,11 +25,11 @@ class IndustryOrder extends BaseModel
public function industryProduct()
{
return $this->belongsTo(IndustryProduct::class);
return $this->belongsTo(IndustryProduct::class)->withTrashed();
}
public function spec()
{
return $this->hasOne(IndustryProductSpec::class, 'id', 'industry_product_spec_id');
return $this->hasOne(IndustryProductSpec::class, 'id', 'industry_product_spec_id')->withTrashed();
}
}
Loading…
Cancel
Save