标签: php mysql laravel-5.3
我有一个问题,我如何在模型函数中关联两个表? 我想关联表商店和订单,但我无法将它们联系起来。 你可以帮帮我吗?
这是我的订单表
更新 这是我的代码
public function order() { return $this->belongsTo(Order::class,'id','store_id'); }