@foreach ($pages as $key=>$page)
@php $inputs = $page
->inputs()
->orderBy('position', 'asc')
->get();
$numerotationTitre = 0;
$numerotationSousTitre = 0; @endphp
@foreach ($inputs as $title)
@if ($title->type->name == 'title')
@php $numerotationTitre++;
$numerotationSousTitre = 0; @endphp
{{$numerotationTitre."- ".$title->display_name }}
@elseif($title->type->name == 'subtitle')
@php $numerotationSousTitre++ @endphp
{{ $numerotationSousTitre."- ".$title->display_name }}
@endif
@endforeach
@endforeach
@endif