@extends('user.layouts.main') @push('style') @endpush @section('contents') @php $timePosted = strtotime($service->created_at); $timeDifference = time() - $timePosted; if ($timeDifference < 60) { $timeElapsed = $timeDifference . ' seconds ago'; } elseif ($timeDifference < 3600) { $minutes = floor($timeDifference / 60); $timeElapsed = $minutes . ' minutes ago'; } elseif ($timeDifference < 86400) { $hours = floor($timeDifference / 3600); $timeElapsed = $hours . ' hours ago'; } else { $days = floor($timeDifference / 86400); $timeElapsed = $days . ' days ago'; } @endphp
View Requested Service
Request List Back
@if ($service->status == '4' || $service->status == '1')
Service Closed
@else
Bid Ongoing
@endif {{--
Bid Ongoing
--}}
{{$timeElapsed}}
@if ($service->status != '4' && $service->status != '1')
@endif
Service ID: #{{$service->service_id}}

{{$service->service_title}}

Category: {{$service->serviceCategory->name}} Requested Date: {{date('d M Y', strtotime($service->request_date))}} Requested Time: {{$service->request_time}} Approx Rate: {{$service->service_rate}} KSh City: {{$service->city}} Location: {{$service->location}} @if ($service->special_note) Special Note: {{$service->special_note}} @endif Description: {{$service->service_description}}
{{-- --}}
@if($userBid) @if($userBid->status == 'accepted')
Congratulations! You have been selected for this service.
  • Bid Amount: {{ number_format($userBid->bid_amount, 2) }} KSh
  • Date: {{ date('d M Y', strtotime($userBid->created_at)) }}
@elseif ($userBid->status == 'rejected')
Sorry, your bid was not selected for this service.

Keep bidding on other services for more opportunities!

  • Bid Amount: {{ number_format($userBid->bid_amount, 2) }} KSh
  • Date: {{ date('d M Y', strtotime($userBid->created_at)) }}
@else
You have already placed a bid!
  • Bid Amount: {{ number_format($userBid->bid_amount, 2) }} KSh
  • Date: {{ date('d M Y', strtotime($userBid->created_at)) }}
@endif {{--
@csrf
--}} @else @if($totalBids > 0)
{{$totalBids}} participants have already joined. You can still participate in the bid.
@else
No participants have placed a bid yet. Be the first to join!
@endif
@csrf
@endif
@endsection