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

Import from Excel

Upload a .xlsx or .csv file. The first row must contain column headers name and email. Or you can Download Template.

@csrf
@error('group_name') {{ $message }} @enderror
@error('file') {{ $message }} @enderror

All Contacts

@if(request('search')) Clear @endif Export Excel
@csrf @method('DELETE')
@forelse ($contacts as $contact) @empty @endforelse
Name Email Groups Status Added On Action
{{ $contact->name }} {{ $contact->email }}
@forelse($contact->groups->take(1) as $group) {{ $group->name }} @empty No group @endforelse @if($contact->groups->count() > 1) +{{ $contact->groups->count() - 1 }} more @endif
@if($contact->unsubscribed_at) Unsubscribed @else Subscribed @endif {{ $contact->created_at->format('M d, Y') }}
{{ request('search') ? 'No contacts matched your search.' : 'No contacts found.' }}
{{ $contacts->appends(request()->query())->links() }}
@endsection