@php $header = $header ?? null; $action = $action ?? ''; $perms = $perms ?? []; $perms['rAdmin'] = (Auth::user()->ad_role ?? 0) > 0 ? true : false; @endphp

@if(isset($header) && is_array($header)) @foreach($header as $k=>$elem) @if($k > 0)—@endif @if(isset($elem->url)) {{$elem->name}} @else {{$elem->name}} @endif @endforeach @elseif(isset($header) && !empty($header)) {{$header}} @endif

@if(!empty($action))
@include('components.actions.' . $action, $perms)
@endif