__('Roadtype 1'), '2' => __('Roadtype 2'), '3' => __('Roadtype 3')]; } public function getRoadtypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['roadtype']) ? $data['roadtype'] : ''); $list = $this->getRoadtypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function order() { return $this->belongsTo('Order', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0); } }