'boolean', 'meta_json' => 'array', ]; } public function device(): BelongsTo { return $this->belongsTo(Device::class); } /** * Keychain access groups like TEAM.apple.Spotlight and TEAM.* are not * installed apps. Skip them on write and hide any leftover rows in lists. */ public static function shouldSkipBundle(?string $bundleId): bool { $bundle = strtolower(trim((string) $bundleId)); if ($bundle === '' || $bundle === '*') { return true; } return str_starts_with($bundle, 'apple.'); } public function scopeListed($query) { return $query ->where('bundle_id', '!=', '*') ->whereRaw('LOWER(bundle_id) NOT LIKE ?', ['apple.%']); } }