block_real.blade.php 916 Bytes
@php $colors = Array('#F4C4C2', '#FBF1C8', '#ECFDEF', '#F3ECF6', '#ECFDEF');
 $i = 0;
 $k = 0;
@endphp
@if ($flot->count())
    @foreach ($flot as $key => $cat)
       @if ($k == 0)
           <div class="vacancies__list-label">{{ $title }}</div>
       @endif
        <a href="{{ route('list-vacancies', ['categories' => $cat->id_title]) }}" class="vacancies__item">
            <span style="border-color:{{$colors[$i]}}">
                <b>{{ $cat->name }}</b>
                <i>Вакансий: <span>{{ $cat->cnt }}</span></i>
            </span>
        </a>

        @php
            $i++;
            $k++;
            if ($i > 4) {$i = 0;}
        @endphp
    @endforeach
@else
    <div class="vacancies__list-label">{{ $title }}</div>
    <a class="vacancies__item">
        <span style="border-color:{{$colors[1]}}">
            <b>Тут нет информации</b>
        </span>
    </a>
@endif