16 lines
517 B
PHP
16 lines
517 B
PHP
@props(['product'])
|
|
|
|
@php
|
|
$ticked = collect(\App\Models\Product::BADGES)->filter(fn ($label, $key) => $product->{$key});
|
|
@endphp
|
|
|
|
@if($ticked->isNotEmpty())
|
|
<div class="flex flex-wrap items-center gap-1.5">
|
|
@foreach($ticked as $key => $label)
|
|
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-primary-100 dark:bg-primary-900 text-primary-800 dark:text-primary-200">
|
|
{{ $label }}
|
|
</span>
|
|
@endforeach
|
|
</div>
|
|
@endif
|