@props([ 'resource', 'variables', 'type', 'title', 'view', 'variablesLabel', 'readOnlyKeys' => [], ]) @php $alphabeticalPositions = $variables->sortBy('key')->values()->pluck('id')->flip(); $sharedVariableRows = $variables ->map(fn($variable) => [ 'key' => mb_strtolower($variable->key), 'comment' => mb_strtolower($variable->comment ?? ''), 'scope' => mb_strtolower(str($type)->headline()), ]) ->values(); @endphp
{{ $view === 'normal' ? 'Developer view' : 'Normal view' }} {{ $view === 'normal' ? 'Developer' : 'Normal' }} @if ($view === 'normal')
@can('update', $resource) @endcan
@if ($variables->isEmpty())
@else
Name Scope {{ count($readOnlyKeys) ? 'Value / comment' : 'Comment' }} Multiline
@foreach ($variables as $env) @if (in_array($env->key, $readOnlyKeys))
{{ $env->key }}
Built-in · Read-only
{{ str($type)->headline() }} {{ $env->value }} -
@else @endif @endforeach
@endif @else @if ($variables->whereIn('key', $readOnlyKeys)->isNotEmpty())
Built-in · Read-only
@foreach ($variables->whereIn('key', $readOnlyKeys)->sortBy('key') as $env)
{{ $env->key }}={{ $env->value }}
@endforeach
@endif
@endif