*/ protected $fillable = [ 'user_id', 'subject_id', 'frequency', 'weekdays', 'preferred_time', 'is_active', 'last_sent_at', ]; /** @var array */ protected $casts = [ 'weekdays' => 'array', 'is_active' => 'boolean', 'last_sent_at' => 'datetime', 'preferred_time' => 'datetime:H:i', ]; /** * Get the user associated with this schedule. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the subject associated with this schedule. */ public function subject(): BelongsTo { return $this->belongsTo(Subject::class); } }