@extends('layouts.app') @section('content')

Phonebook

Internal & external contacts. Lookup CallerID names on inbound calls.
Manage Phonebooks Recent Calls Export CSV Add Contact
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
Reset
@if ($contacts->isEmpty())

No contacts match your filters.

Add a contact
@else
@foreach ($contacts as $c) @endforeach
Name Number Phonebook Type Label Company Calls Last Call Actions
@if($c->favorite) @endif @if($c->is_blocked) @endif {{ $c->display_name }} {{ $c->number_raw }} @if($c->number_e164 && $c->number_e164 !== $c->number_raw)
{{ $c->number_e164 }} @endif
@php $pbName = $phonebooks->firstWhere('id', $c->phonebook_id); @endphp @if($pbName) {{ $pbName->name }} @else — @endif @php $kindClass = match($c->kind ?? 'external') { 'internal' => 'bg-info', 'customer' => 'bg-success', 'vendor' => 'bg-warning text-dark', 'other' => 'bg-secondary', default => 'bg-primary' }; @endphp {{ \App\Models\PhonebookContact::KINDS[$c->kind] ?? ucfirst($c->kind ?? 'external') }} @if($c->label) {{ $c->label }} @endif {{ $c->company }} {{ $c->call_count ?: '—' }} {{ $c->last_call_at?->diffForHumans() ?? '—' }} Edit
@csrf
@csrf @method('DELETE')
{{ $contacts->links() }}
@endif
{{-- Import CSV modal --}} @endsection