'boolean' ]; public function admin() { return $this->belongsTo(Admin::class); } /** * Get gambar struktur URL */ public function getGambarStrukturUrlAttribute() { if ($this->gambar_struktur) { return asset('storage/struktur/' . $this->gambar_struktur); } return asset('images/default-img.png'); } /** * Scope untuk struktur aktif */ public function scopeActive($query) { return $query->where('status', true); } /** * Scope untuk urutan */ public function scopeOrdered($query) { return $query->orderBy('created_at', 'desc'); } }