@extends('admin.layout.master') @section('content') @section('ads', 'active') @section('title', 'Ads')
All Ads

@if (session('success'))
{{ session('success') }}
@endif {{--
Category
@foreach ($categories as $category)
@endforeach
City
@foreach ($cities as $city)
@endforeach
Status
@foreach (['Approved', 'Pending', 'Reject', 'Offer'] as $status)
@endforeach
--}}
Category
City
Status

@foreach ($ads as $ad) @endforeach
Date & Time User Name Category Ad Title City Amount View Status Action
{{ $ad->created_at }} {{ $ad->client->full_name ?? 'Admin' }} {{ $ad->type }} {{ $ad->ad_title }} {{ $ad->city }} {{ $ad->price }} View {{ $ad->is_approved == '1' ? 'Approved' : ($ad->is_approved == '2' ? 'Reject' : ($ad->is_approved == '3' ? 'Offer' : 'Pending')) }} @if($ad->is_approved == '3') @if(!empty($ad->offer) && $ad->offer->offer_status == 'Accepted') Offer Accepted @else Offer Sent @endif @else @endif {{-- --}} @if($ad->comment) @endif
@endsection @section('script') @endsection