@props(['person', 'ancestors', 'level_current' => 0, 'level_max']) @php $level_current++; $person_sequence = $ancestors->firstWhere('id', $person->id)->sequence; $ancestors_next = $ancestors->where('degree', $level_current)->filter(function ($item) use ($person_sequence) { return strpos($item->sequence, $person_sequence) !== false; }); @endphp
  • @if ($person)
    @if ($person->photo and Storage::exists('public/photos/' . $person->team_id . '/' . $person->photo)) {{ $person->id }} @else @endif @if ($person->dod or $person->yod)
    {{ __('person.deceased') }}
    @endif
    $person->dod or $person->yod, 'text-primary-500 dark:text-primary-300' => !($person->dod or $person->yod), ])> {{ implode(' ', array_filter([$person->firstname, $person->surname])) }}
    {{-- ancestors (recursive) --}} @if ($level_current < $level_max) @if (count($ancestors_next) > 0) @endif @endif @endif