getHost() . "/storage/jabatan/fungsional/$value"; } function getSkJabatanTambahanAttribute($value): string | null { if (!$value) return null; if (str_starts_with($value, 'http')) return $value; return "https://" . request()->getHost() . "/storage/jabatan/tambahan/$value"; } function pegawai() { return $this->belongsTo(Pegawai::class, 'nip', 'nip'); } function detail() { return $this->hasMany(JabatanPegawaiDetail::class); } function logs() { return $this->morphMany(LogPengajuan::class, 'logable'); } function notes() { return $this->morphMany(CatatanPengajuan::class, 'noteable'); } function scopeActive($query) { return $query->where('active', true); } }