*/ use HasFactory; /** * @var list */ protected $fillable = [ 'course_id', 'type', 'content', 'order_index', 'is_active', ]; /** * @return array */ protected function casts(): array { return [ 'content' => 'array', 'order_index' => 'integer', 'is_active' => 'boolean', ]; } /** * @return BelongsTo */ public function course(): BelongsTo { return $this->belongsTo(Course::class); } }