@extends('layouts.app2') @section('content')
@php $counter = 0; // Initialiser un compteur @endphp @foreach($Posts->skip(0) as $post)
@php $isFavorited = DB::table('favorites') ->where('user_id', auth()->id()) ->where('post_id', $post->id) ->exists(); @endphp @auth
@endauth @guest @endguest

{{ $post->city->city_name ?? 'City not specified' }}.

@if($post->post_money == 0) Négociable @else {{ number_format($post->post_money) }} TND @endif {{ $post->created_at->diffForHumans() }}
@php $counter++; // Incrémenter le compteur @endphp @if($counter % 12 == 0)
@endif @endforeach
@if ($Posts->hasPages())
@endif
@include('../layouts.footer') @endsection