File: D:/HostingSpaces/SBogers84/zuiderbos.nl/app/views/layouts/partials/references/index.blade.php
<section class="references-overview">
<div class="grid-row">
<span class="styling"></span>
<div class="overview-placeholder grid-col offset-1 col-11">
{{-- Return link --}}
<div class="return-link">
<?php $pageParent = $page->getParent(); ?>
<a href="/{{$links->{$pageParent->code_name}->route}}">
{{ KommaLang::get('returnTo') }} ‘{{$links->{$pageParent->code_name}->name}}’
</a>
</div>
{{-- Make header and pagination if needed --}}
<div class="overview-header grid-row full-row">
<h1 class="grid-col col-7">{{$page->translation->name}}</h1>
<div class="pagination grid-col col-7">
@if(method_exists($schoolReferences, 'links'))
{{$schoolReferences->links('layouts.partials.posts.pagination')}}
@endif
</div>
</div>
{{-- Loop through reference for this pagination page--}}
<div class="grid-row full-row articles">
@foreach($schoolReferences as $key => $otherReference)
<?php
$referenceRoute = $otherReference->translations->first()->routes->filter(function (
$route
) use ($page) {
if (starts_with($route->route, $page->translation->route->route)) {
return $route->route;
}
})->first();
?>
@if(!empty($referenceRoute))
<article class="reference">
<a class="other-reference" href="/{{$referenceRoute->route}}">
<figure>
<div class="figure-placeholder">
@if($otherReference->images->count() != 0)<span
style="background-image: url('{{$otherReference->images->first()->medium_image_url}}');"></span>@endif
</div>
</figure>
<div class="content">
<div class="placeholder">
<p>“{{$otherReference->translations->first()->streamer}}”</p>
<span>- {{$otherReference->name}}</span>
</div>
<span class="button">{{KommaLang::get('readInterview')}}</span>
</div>
</a>
</article>
@endif
@endforeach
</div>
<div class="pagination bottom grid-col col-12">
@if(method_exists($schoolReferences, 'links'))
{{$schoolReferences->links('layouts.partials.posts.pagination')}}
@endif
</div>
</div>
</div>
</section>