where('type_id',39)->select(); $status = []; foreach ($project_status as $v) { $status[$v['value']] = $v['name']; } return $status[$value]; } public function getBiddingTimeAttr($value) { return empty($value) ? '' : date('Y-m-d H:i:s', $value); } public function getDiscoveryTimeAttr($value) { return empty($value) ? '' : date('Y-m-d H:i:s', $value); } public function custom() { return $this->belongsTo(\app\common\model\custom\Custom::class, 'custom_id'); } }