增加关联关系
This commit is contained in:
@@ -46,4 +46,13 @@ class StockOrderAccounts extends Model
|
||||
* 不允许自动填充模型字段
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
|
||||
/**
|
||||
* 关联主订单
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(StockOrders::class, 'order_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user