| @@ -19,8 +19,19 @@ | ||
| 19 | 19 | * |
| 20 | 20 | * @package FluentCrm\App\Models |
| 21 | 21 | * |
| 22 | 22 | * @version 1.1.0 |
| 23 | + * | |
| 24 | + * @property bool|null $is_course_admin | |
| 25 | + * @property bool|null $can_self_enroll | |
| 26 | + * @property int|null $students_count | |
| 27 | + * @property string|null $course_type | |
| 28 | + * @property mixed $lockscreen | |
| 29 | + * @property mixed $category_ids | |
| 30 | + * @property int|null $completed_students | |
| 31 | + * @property float|null $overAllProgress | |
| 32 | + * @property-read mixed $categories | |
| 33 | + * @property-read mixed $creator | |
| 23 | 34 | */ |
| 24 | 35 | class Course extends BaseSpace |
| 25 | 36 | { |
| 26 | 37 | protected static $type = 'course'; |
| @@ -105,9 +116,9 @@ | ||
| 105 | 116 | public function students() |
| 106 | 117 | { |
| 107 | 118 | return $this->belongsToMany(User::class, 'fcom_space_user', 'space_id', 'user_id') |
| 108 | 119 | ->wherePivot('role', 'student') |
| 109 | - ->withPivot(['role', 'created_at', 'status']); | |
| 120 | + ->withPivot([ 'role', 'created_at', 'status' ]); | |
| 110 | 121 | } |
| 111 | 122 | |
| 112 | 123 | public function course_topics() |
| 113 | 124 | { |
| @@ -136,9 +147,9 @@ | ||
| 136 | 147 | public function getCourseType() |
| 137 | 148 | { |
| 138 | 149 | $courseType = Arr::get($this->settings, 'course_type', 'self_paced'); // possible values: self_paced | scheduled | structured |
| 139 | 150 | |
| 140 | - $validTypes = ['self_paced', 'scheduled', 'structured']; | |
| 151 | + $validTypes = [ 'self_paced', 'scheduled', 'structured' ]; | |
| 141 | 152 | |
| 142 | 153 | if (!in_array($courseType, $validTypes)) { |
| 143 | 154 | return 'self_paced'; |
| 144 | 155 | } |