You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
475 B

<?php
namespace App\Models;
class CourseType extends SoftDeletesModel
{
const START_DATE = '2000-01-01';
protected $appends = ['is_count_genban_text'];
/**
* 是否统计跟班学员数文字
*/
public function getIsCountGenbanTextAttribute()
{
return ($this->attributes['is_count_genban'] ?? 1) == 1 ? '是' : '否';
}
public function courses()
{
return $this->hasMany(Course::class, 'type', 'id');
}
}