@php $similar = \App\Models\Flat::where('status', 1) //->whereBetween('size', [ $flat->size - 10 , $flat->size + 10 ]) ->where('rooms_total', $flat->rooms_total) ->whereNotIn('id', [$flat->id]) ->inRandomOrder() ->limit(3) ->get(); @endphp @if ($similar->count() > 0)

{{ __('Hasonló lakások') }}

@php $promoted_flats = config('flats.tavaszi_akcio'); @endphp @foreach ($similar as $flat) @php $is_promoted = false; if (in_array($flat->id, $promoted_flats)) { $is_promoted = true; } @endphp @include('content/shared/flat_card_row', ['flat' => $flat, 'promoted' => $is_promoted]) @endforeach
@endif