@extends('layouts.layout')

@section('title', 'All Posted Job')


@section('main')

<div class="row justify-content-center">
  <div class="col-12 col-md-12">

    <?php foreach ($jobs as $job): ?>
    <div class="card border20 bg-white shadow p-3 mb-3">
      <div>
        <a  href="/job/del/<?= base64_encode($job->id) ?>" class="btn jq-confrm-del btn-icon btn-outline-secondary p-2 float-right "><i class="fa fa-trash"></i></a>
        <a  href="/job/edit/{{ base64_encode($job->id) }}" class="btn jq-confrm-edit btn-icon btn-outline-secondary p-2 float-right "><i class="fa fa-pencil-alt"></i></a>
        <h2><a  href="/job/{{ base64_encode($job->id) }}" class="text-dark">{{ $job->title }}</a></h2>
        <small>-{{ Carbon\Carbon::parse($job->created_at)->format('Y-m-d') }}</small><br>
        <b class="text-blue"><span>Budget:</span> ৳ {{ $job->budget }}</b>
        <br>
        <p>{{ substr($job->job_desc,0,200) }} 
          <br><a href="/job/{{ base64_encode($job->id) }}">See More...</a>
        </p>
        @if($job->count !=null)
        <button class="btn btn-white"><?=$job->count?> Bids</button>
        @endif
      </div>
    </div>
    <?php endforeach ?>

  </div>
</div>


@endsection