belongsTo('Customers', 'customers_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function unit() { return $this->belongsTo('unit', 'unit_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function goods() { return $this->belongsTo('Goods', 'goods_code', 'goods_code', [], 'LEFT')->setEagerlyType(0); } }