@extends('layouts.app') @section('content') {{-- Page Header --}} {{-- Posts Table --}}

{{ __('Selling Posts') }} {{ __('(Latest)') }}

@forelse($posts as $post) @empty @endforelse
{{ __('#ID') }} {{ __('Name') }} {{ __('Condition') }} {{ __('Price (Asking / Sold)') }} {{ __('Status') }} {{ __('Sold?') }} {{ __('Action') }}
{{ $post->id }}
{{ $post->name }}
{{ $post->conditions }} {{ currencyFormat($post->asking_price) }} / {{ currencyFormat($post->sold_price) }} @php $className = ''; $icon = ''; if ($post->status === 'Approve') { $className = 'text-success'; $icon = 'fas fa-check-circle'; } elseif ($post->status === 'Pending') { $className = 'text-warning'; $icon = 'fas fa-clock'; } elseif ($post->status === 'Reject') { $className = 'text-danger'; $icon = 'fas fa-times-circle'; } elseif ($post->status === 'In-Review') { $className = 'text-info'; $icon = 'fas fa-eye'; } elseif ($post->status === 'Soled') { $className = 'text-secondary'; $icon = 'fas fa-shopping-cart'; } @endphp @if ($post->is_sold) {{ __('Yes') }} @else {{ __('No') }} @endif
@if ($post->trashed()) @else {{-- Edit Button --}} @can('posts.edit') @endcan {{-- Delete Button --}} {{-- @can('posts.destroy') --}} {{-- @endcan --}} @endif
{{ __('No posts found') }}
{{-- Pagination --}}
{{ $posts->links() }}
@endsection