my request is quite strange and I have not found anything on the forum.
<?php
$tagPages = collection('photography');
$tags = $tagPages->pluck('tags', ',', true);
$images = $tagPages->images()->limit(1);
foreach($tags as $tag): ?>
<div class="pure-u-1 pure-u-sm-1-2 pure-u-xl-1-3 box-1">
<a href="<?= url('photography', ['params' => ['tag' => $tag]]) ?>">
<?php foreach ($images as $image) : ?>
<figure>
<img src="<?= $image->url() ?>" alt="">
<figcaption>
<span>
<span><?= html($tag) ?></span>
</span>
</figcaption>
</figure>
<?php endforeach ?>
</a>
</div>
<?php endforeach ?>
this is my code at the moment, but i would like to fetch the first image of the first tag, not the first image of the collection.
Obviously the problem exists because I can not take the parent of the plucked tags.
Can you help me? Thanks!