🧪 Diagnóstico del modelo {{ get_class($model) }}
@php $debug = method_exists($model, 'getExtendableDebugData') ? $model->getExtendableDebugData() : []; $attributes = $debug['attributes'] ?? []; $traits = $debug['traits'] ?? []; $methods = []; $methodTypes = ['fillable', 'cast', 'audit', 'hidden', 'appends']; foreach ($traits as $trait) { $traitName = class_basename($trait); foreach ($methodTypes as $type) { $method = 'get' . ucfirst($type) . $traitName; if (method_exists($model, $method)) { try { $methods[$traitName][$type] = $model->{$method}(); } catch (\Throwable $e) { $methods[$traitName][$type] = ['⚠️ Error: ' . $e->getMessage()]; } } } } $simpleProps = [ 'hidden' => method_exists($model, 'getHidden') ? $model->getHidden() : ($model->hidden ?? []), 'appends' => method_exists($model, 'getAppends') ? $model->getAppends() : ($model->appends ?? []), ]; @endphp {{-- GRUPO: Atributos Extendidos --}}

📦 Atributos extendidos del modelo

@foreach ($attributes as $type => $data)

{{ $type }} ({{ $data['cache_key'] ?? 'sin cache' }})

Base

@json($data['base'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)

Extendidos

@json($data['extended'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)

Combinado

@json($data['combined'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
🚀 Cache: {{ $data['cache_enabled'] ? 'ACTIVO' : 'INACTIVO' }} 🧪 Bypass: {{ $data['bypass_cache'] ? 'Sí (modo local)' : 'No' }} ⏱ TTL: {{ $data['ttl'] }} seg
@endforeach
{{-- GRUPO: hidden y appends --}}

🔐 Propiedades visibles y ocultas

@foreach($simpleProps as $key => $value)

{{ $key }}

@json($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)
@endforeach
{{-- GRUPO: Traits --}}

🧠 Traits detectados

    @foreach($traits as $trait)
  • {{ $trait }}
  • @endforeach
{{-- GRUPO: Métodos por Trait --}}

🔍 Métodos de extensión encontrados

@json($methods, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)