__('Away 1'), '2' => __('Away 2'), '3' => __('Away 3'), '4' => __('Away 4')]; } public function getPlatformList() { return ['1' => __('Platform 1'), '2' => __('Platform 2'), '3' => __('Platform 3')]; } public function getAwayTextAttr($value, $data) { $value = $value ? $value : (isset($data['away']) ? $data['away'] : ''); $list = $this->getAwayList(); return isset($list[$value]) ? $list[$value] : ''; } public function getPlatformTextAttr($value, $data) { $value = $value ? $value : (isset($data['platform']) ? $data['platform'] : ''); $list = $this->getPlatformList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }