@extends('layouts.admin')

@section('content')
    <div class="card shadow mb-4">
        <div class="card-header py-3 d-flex">
            <h6 class="m-0 font-weight-bold text-success">
                {{ $shippingCompany->name }}
            </h6>
            <div class="ml-auto">
                <a href="{{ route('admin.shipping_companies.index') }}" class="btn btn-success">
                    <span class="text">Back to Shipping Companies</span>
                </a>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>Name</th>
                    <th>Fast</th>
                    <th>Status</th>
                    <th>Created at</th>
                    <th>Countries</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>{{ $shippingCompany->name }}</td>
                    <td>{{ $shippingCompany->fastName }}</td>
                    <td>{{ $shippingCompany->status_label }}</td>
                    <td>{{ $shippingCompany->created_at }}</td>
                    <td>{{ implode(",",$shippingCompany->countries->pluck('name')->toArray())}}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
@endsection
