Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @php
- $images = collect($images)->shuffle()->take(6)->toArray();
- @endphp
- @php
- $sentences = collect($sentences)->take(12)->toArray();
- shuffle($sentences);
- @endphp
- @if(!empty($sentences))
- <p>{{ @array_pop($sentences) }} {{ @array_pop($sentences) }}</p>
- @endif
- @foreach(collect($images)->shuffle()->chunk(3) as $chunked)
- @if($loop->iteration == 2)
- <div class="text-left">
- <h3>{{ @array_pop($sentences) }}</h3>
- <img src="{{ collect($images)->random()['url'] }}" width="34%" align="left" style="margin-right: 8px;margin-bottom: 8px;">
- @foreach(collect($sentences)->chunk(3) as $chunked_sentences)
- <p>
- @if($loop->first) <strong>{{ ucfirst($keyword) }}</strong>. @endif @foreach($chunked_sentences as $chunked_sentence){{ $chunked_sentence }} @endforeach
- </p>
- @endforeach
- </div>
- @endif
- <div class="row">
- @foreach($chunked as $image)
- <div class="column">
- <img class="img-fluid" src="{{ $image['url'] }}" onerror="this.onerror=null;this.src='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQh_l3eQ5xwiPy07kGEXjmjgmBKBRB7H2mRxCGhv1tFWg5c_mWT';" style="width:100%">
- <p>{{ $image['title'] }}</p>
- </div>
- @endforeach
- </div>
- @endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement