@extends('layouts.app') @section('title', 'Contacts') @section('content') @can('contacts.export') Export CSV @endcan @can('create', \App\Models\Contact::class) New contact @endcan @if (! $usage['unlimited'] && $usage['percent'] >= 90)
{{ number_format($usage['used']) }} of {{ number_format($usage['limit']) }} contacts used on your plan.
@endif
@if ($contacts->isEmpty()) @can('create', \App\Models\Contact::class) Add your first contact @endcan @else
@foreach (['first_name' => 'Name', 'email' => 'Email', 'last_contacted_at' => 'Last contact', 'created_at' => 'Added'] as $column => $label) @endforeach @foreach ($contacts as $contact) @endforeach
{{ $label }} CompanyTypeOwner
{{ $contact->full_name }} @if ($contact->job_title){{ $contact->job_title }}@endif @if ($contact->email){{ $contact->email }}@else @endif @if ($contact->phone){{ $contact->phone }}@endif {{ $contact->last_contacted_at?->diffForHumans() ?? '—' }} {{ $contact->created_at->format('d M Y') }} {{ $contact->company?->name ?? '—' }} {{ ucfirst($contact->contact_type) }} {{ $contact->owner?->name ?? '—' }}
@endif {{ $contacts->links() }}
@endsection