@php use Illuminate\Support\Str; function custom_asset($path) { return url('/' . $path); } $isCategoryPromoted = 1; @endphp @forelse ($advertisements as $advertisment)
@if ($slug == 'sale') @php $slugTitle = str::slug($advertisment->title); if($slugTitle == '') { $slug = preg_replace('/\s+/', '-', $advertisment->title); $slugTitle = trim($slug, '-'); } @endphp ... @if ( (count($advertisment->internationalPromoted) > 0 || $advertisment->isLocalCategoryPromoted($countryId)) && $isCategoryPromoted <= 6) @php $isCategoryPromoted++; @endphp
{{__("words.PROMOTED")}}
@endif
@if (auth()->check()) @if (auth()->user()->id != $advertisment->created_by_id) @endif @else @endif @else @auth @if (auth()->user()->id != $advertisment->created_by_id)
@endif @endauth @guest @endguest @if ( (count($advertisment->internationalPromoted) > 0 || $advertisment->isLocalCategoryPromoted($code)) && $isCategoryPromoted <= 6) @php $isCategoryPromoted++; @endphp
{{__("words.PROMOTED")}}
@endif @endif
@php $slugTitle = str::slug($advertisment->title); if($slugTitle == '') { $slug = preg_replace('/\s+/', '-', $advertisment->title); $slugTitle = trim($slug, '-'); } $translated = $advertisment->getTranslation(); @endphp
{{ $translated['title'] }} {{-- {{ $advertisment->getTranslatedTitle($target) }} --}}
@if ($advertisment->firstCategory->getCategory->title != 'Jobs')

@if(empty($advertisment->jobs)) {{ $translated['address'] }} {{-- {{ $advertisment->getTranslatedAddress($target) }} --}} @endif

@endif
@php // $verifyCount = 2; $verifyCount = $advertisment->getCreatedBy->year_count; @endphp @if ($verifyCount > 0)

{{ $verifyCount }}y

@endif {{ $advertisment->created_at->diffForHumans() }}

{{ $advertisment->price_with_currency }}

{{ __('words.(Fixed Price)') }}
@php $fromSymbol = $advertisment->getCurrency->symbol; $toSymbol = !empty($current) ? $current : 'BTC' @endphp
{{convertAmount($fromSymbol,$toSymbol,$advertisment->price)}}
@if ($advertisment->is_accept_fiat == 1) {{ __('words.Fiat Money') }} @endif
@php $chatText = $slug == 'sale' ? 'Chat with seller' : 'Chat with buyer'; @endphp
@if (empty($advertisment->checkAllowChat())) {{ __("words.$chatText") }} @else {{ __("words.$chatText") }} @endif
@empty

{{ __('words.No data found') }}

@endforelse