<section class="mb-5">
<h2 class="mb-4">Recommended for You</h2>
<div class="row">
<?php foreach ($recommendedListings as $recommendedListing): ?>
<?php if ($recommendedListing->id === ($excludeId ?? null)) {
continue; // Skip the current listing
} ?>
<div class="col-md-4 mb-3">
<div class="card">
<div class="card-body">
<h5 class="card-title"><?= _e($recommendedListing->replacedTitle()) ?></h5>
<p class="card-text text-muted fs-sm">
<?= substr($recommendedListing->replacedContent(), 0, 100) ?>...
</p>
<?php if (!$recommendedListing->tags->isEmpty()): ?>
<div class="mb-2">
<?php foreach ($recommendedListing->tags as $tag): ?>
<span class="badge badge-info fs-xs"><?= _e($tag->name) ?></span>
<?php endforeach; ?>
</div>
<?php endif; ?>
<a href="<?= route()->url('frontend.listings.show', ['id' => $recommendedListing->id]) ?>"
class="btn btn-sm btn-primary">View Details</a>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</section>
<?php endif; ?>-
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.