@php $property = $post->postable; $files = $post->images_folder ? Storage::allFiles($post->images_folder) : []; $image = $files[0] ?? null; $type = ''; if ($property) { if (isset($property->house_type)) { $type = (config('enums.property_type')[$property->property_type] ?? '') . ' - ' . (config('enums.house_type')[$property->house_type] ?? ''); } elseif (isset($property->workplace_type)) { $type = (config('enums.property_type')[$property->property_type] ?? '') . ' - ' . (config('enums.workplace_type')[$property->workplace_type] ?? ''); } elseif (isset($property->land_type)) { $type = (config('enums.property_type')[$property->property_type] ?? '') . ' - ' . (config('enums.land_type')[$property->land_type] ?? ''); } } $detailUrl = $property ? route('post.show', ['slug' => $property->slug]) : route('home'); $isCompleted = ($variant ?? '') === 'completed'; $isActive = ($variant ?? '') === 'active'; $locationParts = array_filter([ $property->country ?? null, $property->district ?? null, $property->neighborhood ?? null, ]); @endphp
@if($image) {{ $post->title }} @else {{ $post->title }} @endif @if($isCompleted) Tamamlandı @elseif($isActive) Açık Artırma @else Teklif Bekleniyor @endif @if($post->bank && ($post->bank->logo_path || file_exists('assets/img/card-logo/'. $post->bank->code .'.png'))) {{ $post->bank->name }} @endif
{{ number_format($post->current_price, 0, '.', '.') }} TL
{{ $type }}

{{ Str::limit($post->title, 70) }}

@if(count($locationParts))
Konum {{ Str::upper(implode(' - ', $locationParts)) }}
@endif
@if(isset($property->net_m2)) {{ number_format($property->net_m2, 0, '.', '.') }} m² @endif @if(isset($property->room_count)) {{ config('enums.room_count')[$property->room_count] ?? '' }} @endif @if(isset($property->floor)) {{ config('enums.floor')[$property->floor] ?? $property->floor }} @endif
@if(isset($post->code)) İlan Kodu:{{ $post->code }} @endif @if(isset($post->tender_code)) İhale Kodu:{{ $post->tender_code }} @endif
@if(Auth::user()) @isset($favoritePosts) @endisset @endif