@extends('admin.layout.layout')
@section('title', 'İlanlar')
@section('styles')
@parent
@stop
@section('content')
@php
$formatExportMoney = static function ($value, $fallback = null) {
$amount = ($value === null || $value === '') ? $fallback : $value;
if ($amount === null || $amount === '') {
return '-';
}
return number_format((float) $amount, 0, ',', '.') . ' TL';
};
$formatExportDateTime = static function ($value) {
if (empty($value)) {
return '-';
}
try {
return \Carbon\Carbon::parse($value)->format('d.m.Y H:i');
} catch (\Throwable $exception) {
return '-';
}
};
@endphp
{{-- {{ dd($properties) }} --}}
Tüm İlanlar
Ana Sayfa Sırası
İlan Ekle
@foreach($properties as $property)
@if ($property->post->tender_status != 2)
İlan Kodu
Banka
Emlak Tipi
Emlak Alt Tipi
İlan Başlığı
Başlangıç Bedeli
Güncel Bedel
İl
İlçe
Durum
İşlem
@endif
@endforeach
{{ $property->post->code }}
{{ $property->post->bank->name }}
{{ config('enums.property_type')[$property->property_type] }}
@if (isset($property->house_type))
{{ config('enums.house_type')[$property->house_type] }}
@endif
@if (isset($property->workplace_type))
{{ config('enums.workplace_type')[$property->workplace_type] }}
@endif
@if (isset($property->land_type))
{{ config('enums.land_type')[$property->land_type] }}
@endif
@isset($property->post->title)
{{ $property->post->title }}
@endisset
{{ $formatExportMoney($property->post->start_price) }}
{{ $formatExportMoney($property->post->current_price, $property->post->start_price) }}
{{ $property->country }}
{{ $property->district }}
{{ config('enums.tender_status')[$property->post->tender_status] }}
{{--
İhalesi Tamamlananlar
@foreach($properties as $property)
@if ($property->post->tender_status == 2)
İlan Kodu
Banka
Emlak Tipi
Emlak Alt Tipi
İlan Başlığı
Başlangıç Bedeli
Güncel Bedel
İhale Başlangıç
İhale Bitiş
İl
İlçe
Durum
İşlem
@endif
@endforeach
{{ $property->post->code }}
{{ $property->post->bank->name }}
{{ config('enums.property_type')[$property->property_type] }}
@if (isset($property->house_type))
{{ config('enums.house_type')[$property->house_type] }}
@endif
@if (isset($property->workplace_type))
{{ config('enums.workplace_type')[$property->workplace_type] }}
@endif
@if (isset($property->land_type))
{{ config('enums.land_type')[$property->land_type] }}
@endif
@isset($property->post->title)
{{ $property->post->title }}
@endisset
{{ $formatExportMoney($property->post->start_price) }}
{{ $formatExportMoney($property->post->current_price, $property->post->start_price) }}
{{ $formatExportDateTime($property->post->first_offer_time) }}
{{ $formatExportDateTime($property->post->end_time) }}
{{ $property->country }}
{{ $property->district }}
{{ config('enums.tender_status')[$property->post->tender_status] }}