@extends('layouts.app') @section('title', $project->title) @section('content')
{{ $project->category->name ?? 'General' }} @if($project->featured) Featured @endif {{ ucfirst($project->status) }}

{{ $project->title }}

${{ number_format($project->budget_min ?? 0) }} - ${{ number_format($project->budget_max ?? 0) }}
{{ $project->bids_count ?? 0 }} bids
Posted {{ $project->created_at->diffForHumans() }}
Deadline: {{ $project->deadline ? $project->deadline->format('M d, Y') : 'Not specified' }}
@guest Sign Up to Bid @else @if(auth()->user()->role === 'buyer' && $project->status === 'open') Place Bid @endif @endguest

Project Description

{{ nl2br(e($project->description)) }}
@if($project->skills)

Skills Required

@foreach(explode(',', $project->skills) as $skill) {{ trim($skill) }} @endforeach
@endif

Bids ({{ $project->bids_count ?? 0 }})

@guest

Please login to view bids.

@else @if(auth()->user()->role === 'vendor' || auth()->user()->id === $project->vendor_id) @forelse($project->bids as $bid)
{{ $bid->user->name }}

{{ $bid->user->name }}

{{ $bid->user->profile->rating ?? 0 }} · {{ $bid->user->bids_count ?? 0 }} bids

{{ $bid->proposal }}

${{ number_format($bid->amount) }}
{{ $bid->created_at->diffForHumans() }}
@if(auth()->user()->id === $project->vendor_id && $project->status === 'open')
@if($bid->status === 'pending')
@csrf
@elseif($bid->status === 'accepted') Awarded @endif
@endif
@empty
No bids yet. Be the first to bid on this project!
@endforelse @else

Only the project owner can view bids.

@endif @endguest

About the Client

{{ $project->vendor->name }}

{{ $project->vendor->name }}

{{ $project->vendor->credit_score ?? 0 }} Credit Score
{{ $project->vendor->projects_count ?? 0 }} projects posted
{{ $project->vendor->kyc_status === 'verified' ? 'Verified' : 'Not Verified' }}
{{ $project->vendor->location ?? 'Location not specified' }}
@guest @else @if(auth()->user()->role === 'buyer') Contact Client @endif @endguest

Project Details

Budget: ${{ number_format($project->budget_min ?? 0) }} - ${{ number_format($project->budget_max ?? 0) }}
Posted: {{ $project->created_at->format('M d, Y') }}
Deadline: {{ $project->deadline ? $project->deadline->format('M d, Y') : 'Not specified' }}
Status: {{ ucfirst($project->status) }}
@endsection