'boolean', 'alert_time' => 'datetime', 'enabled_waktu_makan_ids' => 'array' ]; public function user() { return $this->belongsTo(User::class); } public function getEnabledWaktuMakanAttribute() { if (!$this->enabled_waktu_makan_ids) { return WaktuMakan::where('is_active', true)->get(); } return WaktuMakan::whereIn('id', $this->enabled_waktu_makan_ids) ->where('is_active', true) ->get(); } }