diff --git a/app/Models/Course.php b/app/Models/Course.php index 77c4bb8..92aad96 100755 --- a/app/Models/Course.php +++ b/app/Models/Course.php @@ -11,7 +11,7 @@ class Course extends SoftDeletesModel { protected $appends = [ 'date_status', 'publicize', 'sign_date_status', 'qrcode', 'teacher_detail', - 'status_text', 'is_fee_text', 'is_arrange_text', 'show_txl_text', 'show_mobile_text', 'auto_schoolmate_text' + 'status_text', 'is_fee_text', 'is_arrange_text', 'show_txl_text', 'show_mobile_text', 'auto_schoolmate_text', 'is_virtual_text' ]; protected $casts = ['publicize_ids' => 'json']; @@ -51,6 +51,12 @@ class Course extends SoftDeletesModel $array = [0 => '否', 1 => '是']; return $array[$this->attributes['auto_schoolmate']]; } + + public function getIsVirtualTextAttribute() + { + $array = [0 => '否', 1 => '是']; + return $array[$this->attributes['is_virtual']]; + } public function getQrcodeAttribute($value)