{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard --}} @extends('layouts.master') @php $apiResult ??= []; $posts = (array)data_get($apiResult, 'data'); $totalPosts = (int)data_get($apiResult, 'meta.total', 0); $pagePath ??= null; $pageTitles = [ 'list' => [ 'icon' => 'fas fa-bullhorn', 'title' => t('my_listings'), ], 'archived' => [ 'icon' => 'fas fa-calendar-times', 'title' => t('archived_listings'), ], 'favourite' => [ 'icon' => 'fas fa-bookmark', 'title' => t('favourite_listings'), ], 'pending-approval' => [ 'icon' => 'fas fa-hourglass-half', 'title' => t('pending_approval'), ], ]; @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
@if (session()->has('flash_notification'))
@include('flash::message')
@endif
@includeFirst([config('larapen.core.customizedViewPath') . 'account.inc.sidebar', 'account.inc.sidebar'])

{{ $pageTitles[$pagePath]['title'] ?? t('posts') }}

{!! csrf_field() !!}
@if (!empty($posts) && $totalPosts > 0) @foreach($posts as $key => $post) @endforeach @endif
{{ t('Photo') }} {{ t('listing_details') }} -- {{ t('Option') }}
img

{{ str(data_get($post, 'title'))->limit(40) }} @if (in_array($pagePath, ['list', 'archived', 'pending-approval'])) @if (!empty(data_get($post, 'latestPayment')) && !empty(data_get($post, 'latestPayment.package'))) @php if (data_get($post, 'featured') == 1) { $color = data_get($post, 'latestPayment.package.ribbon'); $packageInfo = ''; } else { $color = '#ddd'; $packageInfo = ' (' . t('Expired') . ')'; } @endphp @endif @endif

 {!! data_get($post, 'created_at_formatted') !!}

{{ data_get($post, 'visits') ?? 0 }} {{ data_get($post, 'city.name') ?? '-' }}

{!! data_get($post, 'price_formatted') !!}
@if ( in_array($pagePath, ['list', 'pending-approval']) && data_get($post, 'user_id') == $user->id && empty(data_get($post, 'archived_at')) )

{{ t('Edit') }}

@endif @if ($pagePath == 'list' && isVerifiedPost($post) && empty(data_get($post, 'archived_at')))

{{ t('Offline') }}

@endif @if ($pagePath == 'archived' && data_get($post, 'user_id') == $user->id && !empty(data_get($post, 'archived_at')))

{{ t('Repost') }}

@endif

{{ t('Delete') }}

@endsection @section('after_styles') @endsection @section('after_scripts') {{-- include custom script for listings table [select all checkbox] --}} @endsection