'Zusätzliche Festplatte', self::TYPE_NETWORK => 'Netzwerk-Interface', self::TYPE_USB => 'USB-Gerät', self::TYPE_PCI => 'PCI Passthrough', ]; } public static function typesFor(?\App\Models\User $user = null): array { $types = self::types(); if ($user && ! $user->isAdmin()) { return array_intersect_key($types, array_flip([self::TYPE_DISK, self::TYPE_NETWORK])); } return $types; } protected $fillable = [ 'customer_id', 'type', 'slot', 'config', 'sort_order', ]; protected function casts(): array { return [ 'config' => 'array', 'sort_order' => 'integer', ]; } public function vm(): BelongsTo { return $this->belongsTo(Customer::class, 'customer_id'); } }