(string) (Configuration::getConfig('school_year') ?? ''), 'semester' => (string) (Configuration::getConfig('semester') ?? ''), 'has_final_pdf' => $this->hasColumn('exam_drafts', 'final_pdf_file'), 'has_legacy' => $this->hasColumn('exam_drafts', 'is_legacy'), ]; } private function hasColumn(string $table, string $column): bool { try { return Schema::hasColumn($table, $column); } catch (\Throwable) { return false; } } }