There will be no bias in my house!

This commit is contained in:
floppydiskette 2024-08-31 00:47:19 +01:00
parent a715ae58af
commit 61f01750ff
Signed by: fwoppydwisk
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE

View file

@ -3,9 +3,19 @@
@foreach($categories as $category) @foreach($categories as $category)
<div class="section"> <div class="section">
<h2>{{ $category->name }}</h2> <h2>{{ $category->name }}</h2>
@if($category->id == 1)
<p><em>(These are shuffled every load)</em></p>
@php
$sites = $category->sites->shuffle();
@endphp
@else
@php
$sites = $category->sites;
@endphp
@endif
<hr> <hr>
<ul> <ul>
@foreach($category->sites as $site) @foreach($sites as $site)
<li><a href="{{ $site->url }}">{{ $site->name }}</a> - {{ $site->description }}</li> <li><a href="{{ $site->url }}">{{ $site->name }}</a> - {{ $site->description }}</li>
@endforeach @endforeach
</ul> </ul>