@extends('layouts.app') @section('content')

{{ link_to_route('users.show', 'Lihat Profil '.$user->name, [$user->id], ['class' => 'btn btn-default']) }}
{{ $user->name }} Bagan Keluarga

Kakek & Nenek {{ $fatherGrandpa ? $fatherGrandpa->profileLink('chart') : '?' }} {{ $fatherGrandma ? $fatherGrandma->profileLink('chart') : '?' }} {{ $motherGrandpa ? $motherGrandpa->profileLink('chart') : '?' }} {{ $motherGrandma ? $motherGrandma->profileLink('chart') : '?' }}
Ayah & Ibu {{ $father ? $father->profileLink('chart') : '?' }} {{ $mother ? $mother->profileLink('chart') : '?' }}
  {{ $user->profileLink('chart') }} ({{ $user->gender }})
Anak-Anak & Cucu-Cucu @foreach($childs->chunk(4) as $chunkedChild)
@foreach($chunkedChild as $child)

{{ ++$no }}. {{ $child->profileLink('chart') }} ({{ $child->gender }})

    @foreach($child->childs as $grand)
  • {{ $grand->profileLink('chart') }} ({{ $grand->gender }})
  • @endforeach
@endforeach @if (! $loop->last)

@endif
@endforeach
@foreach ($siblings->chunk(3) as $chunkedSiblings)
@foreach ($chunkedSiblings as $sibling)
@include('users.partials.chart-sibling')
@endforeach
@endforeach @endsection